farin / python-fakturoid Goto Github PK
View Code? Open in Web Editor NEWPython API for fakturoid.
License: MIT License
Python API for fakturoid.
License: MIT License
Fakturoid zmenil počet objektov, ktorý vráti v rámci response (napr. z API endpointu invoices
) z 20 na 40.
Trieda PagedResource
ale počíta stále s 20 objektami, preto pri paginácii vracia len prvých 20 objektov z každej stránky a zvyšok odignoruje.
Pre fix by malo by stačiť upraviť paging.py
class PagedResource(object):
"""List adapter for paged resources. Returns sliceable lazy loaded object."""
def __init__(self, page_size=40):
self.pages = {}
self.page_size = page_size or 40
self.page_count = None
Vopred ďakujem za čo najrýchlejší fix 🙏
Řekl bych, že tato metoda klame názvem. Myslel jsem, že vrátí úplně všechna pole a jejich hodnoty (podobně jako namedtuple.as_dict
), ale vrací pouze ty, které nejsou readonly.
Jaký to má účel? Nebylo by záhodno ji přejmenovat na get_writeable_fields
a upravit to tak, aby get_fields
vracelo všechny vlastnosti?
For example:
fa.fire_invoice_event(11331402, 'deliver')
raises TypeError
exception:
Traceback (most recent call last):
File "test.py", line 40, in <module>
fa.fire_invoice_event(11331402, 'deliver')
File "/home/dev/fakturoid/venv/lib/python3.4/site-packages/fakturoid/api.py", line 46, in wrapper
return fn(self, mapi, *args, **kwargs)
File "/home/dev/fakturoid/venv/lib/python3.4/site-packages/fakturoid/api.py", line 71, in fire_invoice_event
return mapi.fire(id, event, **kwargs)
File "/home/dev/fakturoid/venv/lib/python3.4/site-packages/fakturoid/api.py", line 230, in fire
if (set(kwargs.keys()) - allowed_args):
TypeError: unsupported operand type(s) for -: 'set' and 'dict'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.