parasut-python
Parasut Python API Wrapper (Unoffical)
Warning
This project is not offical library. It's unoffical python wrapper This project is under heavy development. Please be aware before use Query parameters not included for functions
Install
pip install parasut-python
Using
import os
from parasut.client import Client
CLIENT_ID = os.environ['PARASUT_CLIENT_ID']
CLIENT_SECRET = os.environ['PARASUT_CLIENT_SECRET']
USERNAME = os.environ['PARASUT_USERNAME']
PASSWORD = os.environ['PARASUT_PASSWORD']
# Remove sandbox=True when production.
# It's activating sandbox urls for testing
# Sandbox link: api.heroku-staging.parasut.com
client_obj = Client(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET,
username=USERNAME,
password=PASSWORD,
sandbox=True)
# It's required
client_obj.initialize()
# You can get request parameters from
# https://apidocs.parasut.com/#operation/createContact
# All required request data examples can be found at
# https://apidocs.parasut.com
data = {
"data": {
"type": "contacts",
"attributes": {
"email": "user@example.com",
"name": "string",
"short_name": "string",
"contact_type": "person",
"tax_office": "string",
"tax_number": "string",
"district": "string",
"city": "string",
"address": "string",
"phone": "string",
"fax": "string",
"is_abroad": True,
"archived": True,
"iban": "string",
"account_type": "customer"
},
"relationships": {
"category": {
"data": {
"type": "item_categories"
}
},
"contact_people": {
"data": [
{
"type": "contact_people",
"attributes": {
"name": "string",
"email": "user@example.com",
"phone": "string",
"notes": "string"
}
}
]
}
}
}
}
obj = client_obj.functions.createContact(data)
print(obj.json())
Package
Basic structure of package is
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── parasut
│ ├── __init__.py
│ ├── client.py
│ ├── functions.py
│ ├── urls.py
│ └── version.py
├── pytest.ini
├── requirements.txt
├── script
│ └── test
├── setup.py
└── tests
├── __init__.py
├── helpers
│ ├── __init__.py
│ └── my_helper.py
├── tests_helper.py
└── unit
├── __init__.py
├── test_example.py
└── test_version.py
Requirements
Package requirements are handled using pip. To install them do
pip install -r requirements.txt
Tests
Testing is set up using pytest and coverage is handled with the pytest-cov plugin.
Run your tests with py.test in the root directory.
Coverage is ran by default and is set in the pytest.ini file.
To see an html output of coverage open htmlcov/index.html after running the tests.
Travis CI
There is a .travis.yml file that is set up to run your tests for python 2.7
and python 3.2, should you choose to use it.
License
MIT, Copyright (c) 2020 Burak Karahan
Metadata
Release files for parasut-python 0.0.56
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| parasut-python-0.0.56.tar.gz | 11.3 kB | Without provenance | Details for parasut-python-0.0.56.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| parasut_python-0.0.56-py3-none-any.whl | Python 3 | none | any | Details for parasut_python-0.0.56-py3-none-any.whl |
Total release size: 20.6 kB
Release files / parasut-python-0.0.56.tar.gz
| Download URL | parasut-python-0.0.56.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
029d05e5e8036f5bcedd13448072a1bf4213b503e37fa0642faeb41be171bea8
|
|
BLAKE2b-256 checksum How to use checksums |
d912ddc57e77c5bedf5e6ac36a9712d9931e316e12daacfe566085bd014abc70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Release files / parasut_python-0.0.56-py3-none-any.whl
| Download URL | parasut_python-0.0.56-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efd5e0131b6ef11f47fc5b5a66e258f6a4c8f02e512b8e4424afc1c76c37b054
|
|
BLAKE2b-256 checksum How to use checksums |
651b6372006973454742947ceabe47c012e700182e74087ef353c1b540ae81ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Security for parasut-python 0.0.56
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.