Skip to main content

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_at only 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.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nexgensis-connect 1.0.5
File Size Uploaded Provenance Actions
nexgensis_connect-1.0.5.tar.gz 133.5 kB Without provenance Details for nexgensis_connect-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nexgensis-connect 1.0.5
File Interpreter ABI Platform Actions
nexgensis_connect-1.0.5-py3-none-any.whl Python 3 none any Details for nexgensis_connect-1.0.5-py3-none-any.whl

Total release size: 252.8 kB

Release files / nexgensis_connect-1.0.5.tar.gz

Download URL nexgensis_connect-1.0.5.tar.gz
Size 133.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6d76950fa47a36cae648792ba80741382bde086daa6f5002c7ab3715c3617ae1
BLAKE2b-256 checksum
How to use checksums
35fb5ad81211ba9e3830d86e71bc8989f4fb70eb34d5b5a8b8359223db8b77e6
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.5-py3-none-any.whl

Download URL nexgensis_connect-1.0.5-py3-none-any.whl
Size 119.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85cc90ad24fa8a3b583d07e247eefe7ae8729c02df321751e3ce24c3d296075e
BLAKE2b-256 checksum
How to use checksums
74f4558d6544f4c650e529eb28f1d2cac8014bb298d4dfeeb946fd531f79cfdd
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.5

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page