forward-sdk
Python SDK for the Forward Networks REST API.
A Forward Networks Field Integration. Built and maintained by the field team to make integration work easier. It is not a supported Forward Networks product: it carries no SLA, and issues are handled on a best-effort basis rather than through Forward Support.
pip install forward-sdk
from forward_sdk import ForwardClient
with ForwardClient.from_env() as client:
for network in client.networks.list():
print(network.id, network.name)
rows = client.nqe.query(
"foreach device in network.devices select {name: device.name}",
network_id="101",
)
from_env reads FORWARD_URL, FORWARD_USERNAME, FORWARD_PASSWORD and the
other variables listed under
Configuration.
Authentication is HTTP basic. Use an API token: its access key is the username and its secret is the password. A login name and password also work, but are subject to two-factor authentication and account lockout.
What it covers
Every operation in Forward's API. Some groups, among them NQE, snapshots, networks, devices and device tags, are hand-written with curated names and behaviour such as waiting for a snapshot to finish processing. Most of the others are generated from the OpenAPI description Forward produces from its own server code.
Both a synchronous and an asynchronous client, with the same surface except that
you close the asynchronous one with aclose() rather than close(). An
asynchronous client belongs to the event loop that created it.
The client also has call(operation_id, ...), for an operation chosen at run
time (streaming operations are refused); access(), which reports what your
account may do from its roles, read through an unpublished endpoint and cached
until refresh=True; version(); and request counters.
By default, requests to Forward's hosted service are paced
(rate_limit_rpm="auto") and requests to self-hosted deployments are not. Where
snapshot_id is optional and neither the call nor the client sets one, Forward
uses the network's latest processed snapshot.
Notable
NQE first. Running a query, paging or streaming the results, diffing a query across snapshots, and publishing queries to the library are all first-class. Paging carries guard rails for the ways it can go wrong in production: a result set that ends early, a server that stops advancing, a query far larger than expected.
Typed, but tolerant. Responses are pydantic models. Unknown fields and
unknown enum values are preserved rather than rejected, so a Forward release
that adds either does not break an older SDK. NQE rows stay dict[str, Any],
because a query's columns are defined by the query.
Honest about refusals. A missing licence, a feature absent from your deployment, and a role-based denial all arrive as the same status codes, so the SDK does not pretend to tell them apart. It gives you Forward's own explanation and a documented hint about what gates that operation.
Documentation
https://forwardnetworks.github.io/forward-python-sdk/
- Quickstart
- Configuration
- NQE guide
- Availability and gating
- Migrating from the NetBox plugin or the Nautobot plugin
Versions and compatibility
A version is YY.M.N. YY.M is the release line: the Forward release the SDK
version is built for. N is the SDK's own count within the line, starting at 0
for each new line.
For the 26.11 line, "built for" means the SDK targets Forward 26.11. Some behaviour was checked against Forward 26.11, and its models and generated methods come from an API description taken before the 26.11 release.
N is not Forward's patch number. The number does not say that every Forward
patch was tested. It does not say anything about other Forward releases.
To stay within a line, require forward-sdk==26.11.*. Releases before 26.11.0
are numbered 0.1.N. A requirement without an upper bound, such as
forward-sdk>=0.1.45, will accept 26.x releases, and a later line can contain
breaking changes.
What a public name is
Public names are what a program can use without writing a leading underscore:
the SDK's modules whose import names have no leading underscore, what those
modules offer, both clients, and everything reached from any of these. That
includes a client's services, objects nested in them such as client.nqe.repo,
and the objects that calls return, with their methods, properties, fields and
enum members, including those a class gets from a library the SDK depends on.
These are not covered:
- a name with a leading underscore;
- a name a module only imports for its own use;
- the contents of a value the SDK declares no type for, such as one declared
Anyor a plain mapping.
What stays the same within a line
A later release in the same line does not:
- remove or rename a public name;
- change what a public name refers to;
- change a signature so that a call that was valid stops being valid;
- change the declared type of a return value, property or field so that code using what the old type offered stops working.
Allowing None where it was not allowed before is such a change. This covers
generated names, including numbered ones.
A bug fix that keeps these rules may ship in any release of the line. A fix that cannot waits for a later line.
These rules forbid some changes. From the release after 26.11.0, every other change that alters what working code can observe, bug fixes included, has a changelog entry that begins Behaviour change:.
A change these rules forbid waits for the first release of a later line, and its changelog entry begins Breaking:. Fixes are not promised for a line once a later line has been released.
Generated code
Forward's published API description is updated only in the first release of a
line. Within a line, spec/unpublished.yaml, a generator or the locked version
of a tool a generator uses changes only if the regenerated code keeps these
rules. The promise is about the SDK's names and calls, not about what a Forward
server does.
Requirements
Python 3.10 or newer.
Licence
Fair Core License 1.0 with an Apache 2.0 future licence (FCL-1.0-ALv2, see LICENSE). It is source-available, not open source: you can use, modify and redistribute the SDK for any purpose except a competing commercial product or service. You may not move, change, disable or circumvent license key functionality, or modify code the license key protects to use the protected functionality without a valid key or to remove that functionality. Each release becomes available under the Apache License 2.0 two years after it is published. Releases up to and including 0.1.41 remain available under the MIT License. See NOTICE.
Source
src/forward_sdk/__init__.pysrc/forward_sdk/_sync/client.pysrc/forward_sdk/_async/client.pysrc/forward_sdk/config.pypyproject.tomlsrc/forward_sdk/_version.pyspec/SPEC_SOURCE.jsonspec/forward-openapi.yamlspec/unpublished.yamlLICENSENOTICE
Metadata
Release files for forward-sdk 26.11.0
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 |
|---|---|---|---|---|
| forward_sdk-26.11.0.tar.gz | 1.5 MB | With provenance | Details for forward_sdk-26.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forward_sdk-26.11.0-py3-none-any.whl | Python 3 | none | any | Details for forward_sdk-26.11.0-py3-none-any.whl |
Total release size: 2.2 MB
Release files / forward_sdk-26.11.0.tar.gz
| Download URL | forward_sdk-26.11.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
565005373f1bd05ff0581ae4d63498937070e7701888f11659a50b6216f1ff07
|
|
BLAKE2b-256 checksum How to use checksums |
bcaec0648ca43db600add5036f88030611f1a494ff9e67395de38a3807980897
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / forward_sdk-26.11.0-py3-none-any.whl
| Download URL | forward_sdk-26.11.0-py3-none-any.whl |
|---|---|
| Size | 736.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56ce9634cec68b79b6af65ab7c08cd7e1edb17b98b3bc6f8611d5e5492e70d54
|
|
BLAKE2b-256 checksum How to use checksums |
caa1252e7b162a37d2414f25c8534cca80e35d322803ba8bcee519f0db871948
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for forward-sdk 26.11.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for forward_sdk-26.11.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA 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.