{"id":22220828,"url":"https://github.com/nokia/network-as-code-py","last_synced_at":"2025-07-27T15:33:14.434Z","repository":{"id":231509755,"uuid":"781531882","full_name":"nokia/network-as-code-py","owner":"nokia","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-11T17:54:18.000Z","size":34253,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-11T18:38:27.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nokia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-03T15:01:36.000Z","updated_at":"2024-11-11T17:53:35.000Z","dependencies_parsed_at":"2024-06-04T08:03:40.417Z","dependency_job_id":"82eeb0f8-2a6a-456b-89fd-ac0def7551ff","html_url":"https://github.com/nokia/network-as-code-py","commit_stats":null,"previous_names":["nokia/sdk-py"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fnetwork-as-code-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fnetwork-as-code-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fnetwork-as-code-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nokia%2Fnetwork-as-code-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nokia","download_url":"https://codeload.github.com/nokia/network-as-code-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227817160,"owners_count":17824199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T23:10:22.743Z","updated_at":"2025-07-27T15:33:14.427Z","avatar_url":"https://github.com/nokia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NaC-py - Python SDK for controlling 5G network through code\n\nThis repository contains the Python library for Nokia's Network as Code platform,\nallowing Python programs to easily call network APIs to query information or to\nmanage mobile network elements.\n\n## What is Network as Code?\n\nNetwork as Code is a network API aggregator platform developed by Nokia to expose\nnetwork capabilities of mobile networks to applications. It provides numerous\ncapabilities ranging from quality-of-service to network-based location services\nand analytics.\n\nYou can find more information over [at the Nokia home page](https://www.nokia.com/networks/network-as-code/) \nor by going directly to the developer portal: https://developer.networkascode.nokia.io/\n\n## Getting started\n\nYou can find a full Getting Started guide on the developer portal: https://developer.networkascode.nokia.io/docs/getting-started\n\nIf you just want to install the Python library, you can install it with Pip:\n```bash\npip install network_as_code\n```\n\nDo note that use of Network as Code capabilities requires an API token to be provided:\n\n```python\nimport network_as_code as nac\n\nclient = nac.NetworkAsCodeClient(\n    token=\"\u003cMY-TOKEN\u003e\",\n)\n```\n\nYou can get your API tokens by registering on the developer portal and accessing them on\nthe developer dashboard.\n\n## Documentation and Examples\n\nFull documentation is available on the developer portal: https://developer.networkascode.nokia.io/docs\n\nWe also provide some basic usage examples in the [examples](./examples) directory. \n\n## License\n\nThe Network as Code Python SDK is open-source software available under the Apache 2.0 license.\n\n## Development\n\n### Commands\n\n- `uv sync` - install project dependencies\n- `uv run pytest` - run unit tests against mocks\n- `uv run pytest integration_tests` - run integration tests against development APIs\n\n### Architecture\n\nThis project is structured into `models`, `api` and `namespaces`\nmodules. The `models` and `namespaces` modules represent the public\nAPI of the SDK and provide abstractions that allow data to be queried\nand modified on the Network as Code platform. The `api` module implements\nthe communication layer that will actually talk to the NaC web APIs and\nhandle transmission and receipt of data to and from the platform.\n\nThe basic design principle is that functionality should be discoverable\nand logically organized. To achieve that, most actions are carried out\nthrough the `NetworkAsCodeClient` object, which provides access to the\nnamespaces in the `namespaces` module. These namespaces typically provide\nways to query and create different types of data objects in the NaC\nplatform. The data objects themselves have representations in the `models`\nmodule, and are enriched with methods that operate on the individual\ndata object.\n\nNew features typically require modifications to at least the `models`\nand `api` modules. New namespaces are introduced as required, typically\nwhen a new API product is launched. However, the namespaces are intended\nto be an organizational tool and as such should be used whenever a concept\nfalls into a new kind of category and to avoid clutter.\n\n### Development process\n\nThis project is developed using principles from Test-Driven Development.\nThis means that for new bugs fixed and features implemented, there should\nbe matching test cases written.\n\nMain chunk of tests are located under `tests` and are run against\nmocks and intended to work offline and without need to actually\nconnect to an external system.  We also have `integration-tests` which\nuse a development version of the APIs to track compatibility. Both\ntest suites are run in CI/CD and failures are considered blocking.\n\nTest cases should be added to as part of regular development activity and\nold test cases should be kept up-to-date. \n\nNew features and changes to old ones should also be documented as soon\nas possible. This means that developers ought to be in contact with the\ntechnical writers whenever a change is introduced. It is also recommended\nto add an example or update old examples in the `examples` folder to help\ncommunicate functionality and changes to the documentation writers. If\nno technical writer is present then the responsibility of writing documentation \nfalls on the developers. Developers also need to be able to provide input\nto the technical writers to ensure accurate and high-quality documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnokia%2Fnetwork-as-code-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnokia%2Fnetwork-as-code-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnokia%2Fnetwork-as-code-py/lists"}