tmf-mock
Smart TMForum Open API mock server with domain-aware seed data and cross-API referential integrity.
Part of the TMF DevKit project — https://github.com/manojchavan23/tmf-devkit
Generic OpenAPI mock tools (Prism, WireMock) return random strings where you need DSLAM port IDs,
random numbers where you need VDSL2 SNR margins, and have zero awareness that a ServiceOrder must
reference a valid Service which must reference a valid Resource. tmf-mock fixes that.
Supported APIs (v0.1)
| API | Name | Base Path |
|---|---|---|
| TMF638 | Service Inventory Management | /tmf-api/serviceInventoryManagement/v4/service |
| TMF639 | Resource Inventory Management | /tmf-api/resourceInventoryManagement/v4/resource |
| TMF641 | Service Ordering Management | /tmf-api/serviceOrdering/v4/serviceOrder |
Quickstart
pip install -e ".[dev]"
tmf-mock start
Open http://localhost:8000/docs
CLI
tmf-mock start # all 3 APIs, port 8000, with seed data
tmf-mock start --apis 638,639 # only Resource + Service Inventory
tmf-mock start --port 9000 # custom port
tmf-mock start --no-seed # empty store
tmf-mock start --reload # dev mode with auto-reload
Key Endpoints
GET/POST /tmf-api/resourceInventoryManagement/v4/resource
GET/PATCH/DELETE /tmf-api/resourceInventoryManagement/v4/resource/{id}
GET/POST /tmf-api/serviceInventoryManagement/v4/service
GET/PATCH/DELETE /tmf-api/serviceInventoryManagement/v4/service/{id}
GET/POST /tmf-api/serviceOrdering/v4/serviceOrder
GET/PATCH/DELETE /tmf-api/serviceOrdering/v4/serviceOrder/{id}
GET /health
POST /admin/reset
GET /docs
Query Parameters (TMForum standard)
All list endpoints support: ?offset=0&limit=20&fields=id,name&resourceStatus=available&category=Physical
Response headers: X-Total-Count, X-Result-Count
Referential Integrity
ServiceOrder (TMF641)
└── orderItem[].service → Service (TMF638)
└── supportingResource[] → Resource (TMF639)
- DELETE /resource/{id} → 409 if any Service references it
- POST /service with unknown supportingResource → 422
- POST /serviceOrder with action=modify/delete on unknown service → 422
Running Tests
pytest -v
Docker
docker build -t tmf-mock .
docker run -p 8000:8000 tmf-mock
# or
docker compose up
Author
Manoj Chavan — https://linkedin.com/in/manojchavan23
Metadata
Release files for tmf-mock 0.1.1
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 | |
|---|---|---|---|---|
| tmf_mock-0.1.1.tar.gz | 27.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tmf_mock-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.6 kB
Release files / tmf_mock-0.1.1.tar.gz
| Download URL | tmf_mock-0.1.1.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7e5572b8064fb28bdeb98f35da74b4ac890f413c93820910513c4d726326085
|
|
BLAKE2b-256 checksum How to use checksums |
22d4240dbed5708e2375affff1cebcab7fd6fbbb27278f62d57e4519063461f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / tmf_mock-0.1.1-py3-none-any.whl
| Download URL | tmf_mock-0.1.1-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e6aa4a4c515f6e3dead1620f0042dcebb796013e6b0263c3ad4665e1fa60d20
|
|
BLAKE2b-256 checksum How to use checksums |
398cbf81e13f1356d8aec96ba87e5b9324dad8263863f8772a980fd0ea412798
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for tmf-mock 0.1.1
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.