Coder Social home page Coder Social logo

onlinecity / python-economic-rest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kristianoellegaard/python-economic-rest

0.0 14.0 1.0 208 KB

Easy to use and dynamic python interface to the experimental e-conomic REST api

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

python-economic-rest's Introduction

python-economic-rest

Easy to use and dynamic python interface to the experimental e-conomic REST api

Example

from economic.auth import Authentication
from economic.customers import Customer
from economic.invoices import BookedInvoice, DraftInvoice
from economic.products import Product

APP_ID = "<app id>"
ACCESS_ID = "<access id>"

auth = Authentication(APP_ID, ACCESS_ID)

print list(BookedInvoice.all(auth))
print list(DraftInvoice.all(auth))
print list(Customer.all(auth))
print list(Product.all(auth))

# or

print [c.name for c in Customer.all(auth)]
['Acme']
print [p.name for p in Product.all(auth)]
['Do-It-Yourself Tornado Kit']
# ..etc..

# Find usable fields

print list(BookedInvoice.all(auth))[0].valid_fields
[u'customer_city', u'customer_name', u'gross_amount', u'currency', u'vat_amount', u'customer_country', u'net_amount', u'id', u'layout_id', u'net_amount_base_currency', u'due_date', u'is_vat_included', u'rounding_amount', u'order_id', u'customer_address', u'sales_document_type', u'date', u'deduction_amount', u'remainder', u'term_of_payment_id', u'remainder_base_currency', u'customer_postal_code', u'pdf', u'customer', u'self']
# Beware that economic might not always give us all the fields, so this could vary slightly per invoice

python-economic-rest's People

Contributors

kristianoellegaard avatar licentious avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.