Welcome to SPEC-Utils Documentation!#
For more info and help, visit the SPEC-Utils Repo.
Requirements#
Python 3.8+
SPEC-Utils stands on shoulders of:
- requests: For the synchronous HTTP requests.
- aiohttp: For the asynchronous HTTP requests.
- pandas: For the database features.
- SQLAlchemy: For the database connections.
- pydantic: For the data parts.
Install#
Can use:
pip install spec-utils
Or:
python -m pip install spec-utils
Example#
Import module#
from spec_utils import nettime6 as nt6
Client settings#
URL = '<your-nettime-url>'
USERNAME = '<your-username>'
PWD = '<your-password>'
Using client#
with nt6.Client(url=URL, username=USERNAME, pwd=PWD) as client:
print(client.get_employees())
See out...
{
'total': 2,
'items': [{'id': 1, 'nif': '123789456'}, {'id': 2, 'nif': '987321654'}
]}
Using async client#
async with nt6.AsyncClient(url=URL, username=USERNAME, pwd=PWD) as client:
print(await client.get_employees())
See out...
{
'total': 2,
'items': [{'id': 1, 'nif': '123789456'}, {'id': 2, 'nif': '987321654'}
]}
Async coverage#
| Module | Async support | Index name |
|---|---|---|
| nettime6 | :heavy_check_mark: | NT6AsyncClient |
| specmanagerapi | :heavy_check_mark: | SMAPIAsyncClient |
| t3gateway | :heavy_check_mark: | T3AsyncClient |
| visma | :heavy_check_mark: | VismaAsyncClient |
| certronic | :heavy_check_mark: | CertronicAsyncClient |
| wdms | :x: | WDMSClient |
| specmanagerdb | :x: | SMDBClient |
| exactian | :x: | ExactianClient |
License#
This project is licensed under the terms of the GNU GPLv3+ license.