https://github.com/20tab/python-fattureincloud
https://github.com/20tab/python-fattureincloud
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/20tab/python-fattureincloud
- Owner: 20tab
- License: mit
- Created: 2021-04-09T22:10:34.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-14T21:23:18.000Z (about 5 years ago)
- Last Synced: 2025-03-05T19:42:49.699Z (over 1 year ago)
- Language: Python
- Size: 53.7 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# python-fattureincloud
[](https://github.com/python/black)
[](https://github.com/20tab/python-fattureincloud/actions/workflows/python-package.yml)
[](https://codecov.io/gh/20tab/python-fattureincloud)
> A python wrapper for the [FattureInCloud REST API](https://api.fattureincloud.it/v1/documentation/dist/).
## 📦 Installation
Change directory and create a new project as in this example:
```console
$ pip install python-fattureincloud
```
## 🔑 API Credentials
The `FattureInCloudAPI` needs `api_uid` and `api_key` parameters to make requests.
```python
from fattureincloud.client import FattureInCloudAPI
client = FattureInCloudAPI(
api_uid="your_api_uid",
api_key="your_api_key"
)
```
## 🚀️ Usage
At the moment, only method to read information are implemented.
Every model has `list` method with different parameter to filter results.
For each model there is a set of methods to get a specific element.
### ⚫ Anagrafica
```python
# Get all customers
customers = client.clienti().lista()
# Get all suppliers
suppliers = client.fornitori().lista()
```
### ⚫ Prodotti
```python
# Get all products
customers = client.prodotti().lista()
```
### ⚫ Documenti
The following example show how you can get all invoices. But you can use all the following document types: `fatture`, `proforma`, `ordini`, `preventivi`, `ndc`, `ricevute`, `ddt`.
```python
# Get all documents
invoices = client.fatture().lista()
invoice_details = client.fatture.dettagli(
_id="invoice_id",
token="invoice_token"
)
info = clienti.fatture.info(anno_competenza=2021)
invoice_infomail = client.fatture.infomail(
_id="invoice_id",
token="invoice_token"
)
```
### ⚫ Acquisti
```python
# Get all purchases
acquisti = client.acquisti.lista()
acquisti_details = client.acquisti.dettagli(
_id="acquisti_id"
)
```
### ⚫ Corrispettivi
```python
# Get all payments
corrispettivi = client.corrispettivi.lista()
```
### ⚫ Magazzino
```python
# Get all merchandise
arrivimerce = client.arrivimerce.lista()
arrivimerce_details = client.arrivimerce.dettagli(
_id="arrivimerce_id"
)
```
### ⚫ Mail
```python
# Get all mails
mail = client.mail.lista()
```