fms-odata-spec (Python)
Python types and spec definitions for the Claris FileMaker Server OData API.
This is the Python companion to @fms-odata/spec-ts.
Both packages mirror the same specification (defined in the
fms-odata-spec repository) and are
published independently — pick the one matching your runtime. The Python
package has no runtime dependency on the TypeScript package (or vice versa).
What's in the box
- Version identifiers and a feature-flag matrix for Claris FileMaker 2023,
2024, 2025, and 2026 (
versions). - Authentication helpers and config types for Basic and OAuth Bearer auth
(
auth). - Endpoint descriptors and version-scoped lookup helpers (
endpoints). - OData query-option types and literal-formatting helpers (
query_options). $metadataparsing helpers and EDM model types (metadata).- Script execution types and response parsing (
scripts). - Container field upload/download helpers and MIME sniffing (
containers). $batchrequest and result types (batch).- Webhook management types (
webhooks). - Schema modification (DDL) types and field-type parsing (
schema). - Error class hierarchy for OData responses (
errors).
All models are stdlib dataclasses (no pydantic / no validation framework).
Discriminated unions from the TS spec are modeled with typing.Literal
discriminator fields. The package ships a py.typed marker (PEP 561) so
static type checkers pick up the annotations.
Install
pip install fms-odata-spec
For local development from this repository:
cd packages/fms-odata-spec-py
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
pytest
Usage
from fms_odata_spec import (
FM_VERSION_MATRIX,
has_feature,
basic_auth,
parse_server_version,
format_literal,
FMODataError,
)
# Check feature availability per FileMaker Server version.
# Feature names are snake_case (matching the FMFeatureFlags dataclass fields).
assert has_feature("26", "scripts_by_fmsid") is True
assert has_feature("20", "webhooks") is False
# Build a Basic auth header value.
hdr = basic_auth("admin", "secret") # -> "Basic YWRtaW46c2VjcmV0"
# Detect the server version from a $metadata XML payload.
ver = parse_server_version(
'<Annotation Term="Org.OData.Core.V1.ProductVersion" String="26.0.1.500"/>'
)
assert ver.major == 26
# Format an OData $filter literal.
assert format_literal("O'Brien") == "'O''Brien'"
assert format_literal(42) == "42"
Versioning
This package is versioned independently of @fms-odata/spec-ts. It is published
to PyPI as fms-odata-spec.
Roadmap
IMPORTANT — these items must be addressed before publishing to PyPI. See
AGENTS.mdat the repository root for the same list with more detail.
- PyPI publishing workflow —
.github/workflows/py-publish.ymlexists and triggers onpy-v*tag pushes. Remaining: create a PyPI API token, add it as thePYPI_API_TOKENrepo secret, optionally create apypienvironment for protection rules, then re-push the tag to trigger. SeeAGENTS.mdfor full steps. - LICENSE bundling — DONE.
LICENSEis copied into this directory and declared as a wheel artifact + sdist include inpyproject.toml; verified it ships in both the wheel and sdist. - CHANGELOG — add
CHANGELOG.mdwith the 2.0.0 entry. -
ODataEntity[T]ergonomics — confirm the wrapping-dataclass shape (envelope.entity.field) is acceptable before the first release; it is a breaking change to alter afterwards. - CI matrix — add Python 3.14 to
py-ci.ymlonceactions/setup-pythonsupports it. - Async token-refresh — document that
FMOAuthAuthConfig.on_unauthorizedis typed but not invoked by this package (downstream must wire it). - Shared schema source — revisit whether both language packages should be generated from a single JSON Schema / CSDL source before they drift.
License
MIT — see the repository LICENSE.
Metadata
Release files for fms-odata-spec 2.0.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 | Actions |
|---|---|---|---|---|
| fms_odata_spec-2.0.1.tar.gz | 33.0 kB | Without provenance | Details for fms_odata_spec-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fms_odata_spec-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for fms_odata_spec-2.0.1-py3-none-any.whl |
Total release size: 61.3 kB
Release files / fms_odata_spec-2.0.1.tar.gz
| Download URL | fms_odata_spec-2.0.1.tar.gz |
|---|---|
| Size | 33.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75be88059329bac94a19edc4d9c9d217766804d76d43bfe70692dbedcc3c55c2
|
|
BLAKE2b-256 checksum How to use checksums |
36bf876b92758366a66eba40c48ae77de86f553c828949cd3ecc3482caa58e4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / fms_odata_spec-2.0.1-py3-none-any.whl
| Download URL | fms_odata_spec-2.0.1-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b57fe9d34b74a52f5a4d21c6aa15c535fa5ea7a800113c4c8acddd2262bf8c03
|
|
BLAKE2b-256 checksum How to use checksums |
ed25de2c850c54fcaf8548d8ed8f18549d5158ce962a55b25e5a8bd28c9b93e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for fms-odata-spec 2.0.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.