Nexgensis Connect
Nexgensis Connect is a controlled API payload-mapping and orchestration package for Django. It adds reusable field and value mappings, ordered/parallel/for-each chains, manual/event/scheduled triggers, and immutable execution snapshots on top of django-api-utility.
Responsibility boundary
Trigger → Chain → Request mapping → API Utility definition key
→ authentication and HTTPX → Response mapping → execution audit
Nexgensis Connect owns mappings, chains, triggers, run state, and audit snapshots. API Utility owns services, endpoints, authentication, secrets, token caching, retries, schemas, HTTP transport, and process-wide mTLS. The framework never evaluates arbitrary Python, JavaScript, or expression code.
Integrations are configuration, not code
Every business-system integration (BMR/eBMR, ERP, vendor APIs, our own internal sync APIs) goes through Connect. A chain's last step calls the receiving system's API, which does its own syncing - there is no separate "write to our database" step. Only calls to our own EdgeX infrastructure stay as direct request_by_key code.
What used to need a developer, and is now configured per endpoint / rule / chain:
| Need | How |
|---|---|
| Paged list APIs | Endpoint Pagination: PAGE, OFFSET, CURSOR, NEXT_LINK (see services/pagination.py for pagination_config keys). Pages are joined before response mapping; exceeding max_pages fails the call rather than silently truncating. |
| Combining / reshaping fields | Transforms template, concat, coalesce, split, join, filter, flatten_tree (plus the original single-value set). GET field-mappings/transform-choices/ returns each one's description and example params. |
| API list A → matching record id in API list B | Fetch each list through configured endpoints, then use lookup_in_list in a field rule. For example, BMR machine_code matches _steps.2.response.data[].code and returns that item’s id. |
| Retrying a failed run safely | POST runs/<id>/resume/ (Execution history → Resume): steps/items that already succeeded are logged reused and not called again. Set an endpoint's Idempotency header for upstreams that de-duplicate; the key is stable across resumes. |
| Change history / rollback | Every config save is a ConfigRevision (who, when, full snapshot) - config-revisions/, restore with POST config-revisions/<id>/restore/. |
| Promoting dev → prod | GET config/export/[?chains=a,b] and POST config/import/ (dry_run: true shows create/update/unchanged first). Keys, not ids; transport (services, URLs, auth) stays per environment. |
| Approval for config changes | Set NEXGENSIS_CONNECT_CHANGE_GATE to a host function (see services/change_gate.py). edgenexus routes changes into its single-approver + e-signature change control (module /integrations), on by default when DEBUG is off (CONNECT_CHANGE_CONTROL_ENABLED). |
Triggers - how an integration starts
Code never names a chain or an endpoint, only a trigger:
from nexgensis_connect import trigger
result = trigger("mes.batch.completed", {"batch_no": "B-24-0117", "quantity": 500.2})
# {"trigger": ..., "status": "success" | "failed", "results": [{"chain", "status", "run_id", "message", "steps": [...]}]}
Other systems call POST <connect mount>/triggers/<name>/fire/ with the payload as the body, using the host's normal API auth. Both are synchronous and return the same result once every connected chain has finished.
- Trigger definitions (
trigger-definitions/, Integrations → Triggers) -<system>.<entity>.<event>name, payload fields (checked on every fire), sample, optional dedupe field. Created by developers; access through the host's access control. - Connections (
triggers/) - which chain(s) run for a name, each with its own payload mapping (same rules/transforms as field mapping). One name can feed several chains. - Schedules - a connection started by Celery beat: cron + timezone, payload with
{now},{today},{last_success_at}. Saving syncs beat automatically; a schedule never overlaps its own running run;last_success_atonly advances on success.
The remaining sanctioned reason to write code is a genuinely new transform (register_transform) or auth type - written once, then reusable from config by every integration.
Local development
Python 3.11 or newer is required. On this Intel macOS workspace, Python 3.12 is available at /usr/local/bin/python3.12.
cd /Users/Nexgensis-L010/Documents/IOT/nexgensis-connect
sh scripts/setup_local_env.sh
.venv/bin/python backend/manage.py migrate
.venv/bin/python backend/manage.py seed_demo
.venv/bin/pytest
cd frontend
npm install
npm run dev
The editable API Utility installation points to ../api-utility. No API Utility source is copied into this repository.
Docker end-to-end environment
sh scripts/generate_test_certs.sh certs
docker compose up --build --abort-on-container-exit --exit-code-from integration-tests
docker compose down --volumes
The environment starts PostgreSQL, Redis, Django/Gunicorn, Celery Worker, Celery Beat, the React/Vite console, a dummy HTTP API, and a client-certificate-required mTLS API. The one-shot test container runs the unit/integration suite and then exercises mapping, API Utility dispatch, Basic authentication, a real positive and negative mTLS handshake, Celery event delivery, Beat schedule synchronization, and execution-audit retrieval.
The recorded validation matrix is available in TEST_RESULTS.md.
Endpoints:
- UI:
http://localhost:3001 - API:
http://localhost:8000/api/connect/ - Admin:
http://localhost:8000/admin/
Embedding in another Django service
Install django-api-utility and nexgensis-connect, then add both apps:
INSTALLED_APPS = [
# ...
"django_api_utility",
"nexgensis_connect",
]
Include nexgensis_connect.urls under an authenticated host route. The host application must apply its own DRF authentication, authorization, tenant isolation, payload-retention policy, Celery configuration, and API Utility secret provider.
Metadata
Release files for nexgensis-connect 1.0.3
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 |
|---|---|---|---|---|
| nexgensis_connect-1.0.3.tar.gz | 99.8 kB | Without provenance | Details for nexgensis_connect-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nexgensis_connect-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for nexgensis_connect-1.0.3-py3-none-any.whl |
Total release size: 192.7 kB
Release files / nexgensis_connect-1.0.3.tar.gz
| Download URL | nexgensis_connect-1.0.3.tar.gz |
|---|---|
| Size | 99.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5865d83a0e04caf3c34baeb7d604e062c59769eeed0d9e0999fe1263bef7fa65
|
|
BLAKE2b-256 checksum How to use checksums |
c4e46de8e1c5b80ab39dbf142c48225677baa843d16f3b6c279e7e89e4d8ce03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / nexgensis_connect-1.0.3-py3-none-any.whl
| Download URL | nexgensis_connect-1.0.3-py3-none-any.whl |
|---|---|
| Size | 92.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
444a179e0e977480c707b4764e0eca9e5e4d979cff35677910956c17cf01cb81
|
|
BLAKE2b-256 checksum How to use checksums |
6bb50e7046821b3e4e1ee8ce4183a6a324752612bcc74430477a593f8a9ca71f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for nexgensis-connect 1.0.3
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.