nccgest
Python package for synchronous and asynchronous interaction with the NCCGEST REST API.
Full method-by-method documentation:
Features
- Sync client:
NCCGestClient - Async client:
AsyncNCCGestClient - Command coverage:
cmd_readcmd_insertcmd_updatecmd_customercmd_driver
- Typed API errors and HTTP errors
- Python
3.8+support (recommended runtime:3.10+)
Installation
pip install nccgest
Quick Start (sync)
from nccgest import NCCGestClient
with NCCGestClient(domain="your-domain", token="YOUR_TOKEN") as client:
services = client.read_services(start_date="16/03/2026", end_date="16/03/2026")
print(services)
Token Types
According to NCCGEST support:
cmd_read,cmd_insert,cmd_updateuse Customer Tokencmd_customer,cmd_driveruse Master Token
You can pass them separately:
from nccgest import NCCGestClient
client = NCCGestClient(
domain="your-domain",
customer_token="CUSTOMER_TOKEN",
master_token="MASTER_TOKEN",
)
Backward compatibility: token=... still works and is used for both token types.
cmd_read Status Values
status in cmd_read response is a string with one of:
CanceledWaitingConfirmed
In library typing this field is strict: ServiceStatus = Literal["Canceled", "Waiting", "Confirmed"].
Quick Start (async)
import asyncio
from nccgest import AsyncNCCGestClient
async def main() -> None:
async with AsyncNCCGestClient(domain="your-domain", token="YOUR_TOKEN") as client:
driver_data = await client.get_driver_data(driverid=123)
print(driver_data)
asyncio.run(main())
Insert Service Example
from nccgest import NCCGestClient
payload = {
"pickup": "FCO",
"dropoff": "Roma",
"date": "16/03/2026",
"pickup_time": "10:30",
"pax": 2,
"paxname": "John Smith",
"paxphone": "+39000000000",
"servicetype": "Transfer",
"cartype": "Business Class",
"subclass": "EXT-ORDER-12345",
}
with NCCGestClient(domain="your-domain", token="YOUR_TOKEN") as client:
service_id = client.insert_service(payload)
print(service_id)
API Notes
- Use HTTPS only.
- NCCGEST API docs mention no concurrent inserts: avoid parallel create calls.
- Use proper URL encoding for external inputs.
- Follow official endpoint method mapping (
GETfor read/customer/driver,POSTfor insert/update).
Development
pip install -e ".[dev]"
pytest
Mock Service (FastAPI + SQLite)
Install mock dependencies:
pip install -e ".[mock]"
Run:
NCCGEST_LOGIN=test NCCGEST_PASSWORD=test NCCGEST_DBDIR=/data NCCGEST_PORT=8255 python -m nccgest.mock_service
Alternative command:
nccgest-mock
If required mock modules are missing, nccgest-mock prints install instructions:
pip install "nccgest[mock]"
# or for local repo:
pip install -e ".[mock]"
Web UI:
- Login page:
http://localhost:8255/admin/login - Services admin:
http://localhost:8255/admin/services - Customers admin:
http://localhost:8255/admin/customers - Drivers admin:
http://localhost:8255/admin/drivers - API endpoint:
http://localhost:8255/api/rest_api.php
The /data directory is ignored by git and used for the local SQLite DB.
Mock YAML fixtures for tests are stored in tests/mock_data/services.yaml.
UI templates and CSS are separated in:
src/nccgest/mock_service/templates/*.htmlsrc/nccgest/mock_service/static/style.css
Metadata
Release files for nccgest 0.1.6
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 |
|---|---|---|---|---|
| nccgest-0.1.6.tar.gz | 25.7 kB | Without provenance | Details for nccgest-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nccgest-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for nccgest-0.1.6-py3-none-any.whl |
Total release size: 50.6 kB
Release files / nccgest-0.1.6.tar.gz
| Download URL | nccgest-0.1.6.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1f352e1941c6f81fda7287cc4fbbdeeed112d57efa8d7f59ee1ee43fda45e1c
|
|
BLAKE2b-256 checksum How to use checksums |
59990213a953648f2b4362d914864285efe27e044edb5b5f379724b1b1ffd561
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / nccgest-0.1.6-py3-none-any.whl
| Download URL | nccgest-0.1.6-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc87f8e041a4b4172a98520f9f780154c58a953aa538d230f90a1d890faef3bd
|
|
BLAKE2b-256 checksum How to use checksums |
c4ca79025ca0a4b3c43746723bc43cca79b82432574ecf82503d916e76de9c1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for nccgest 0.1.6
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.