Skip to main content

xippios-usda-fas

Shared code of the USDA FAS sources, a package of the xippios SDK family: the code that the family's sources of USDA's Foreign Agricultural Service share, xippios-usda-psd, xippios-usda-esr and xippios-usda-gats, which reach FAS's APIs through the api.data.gov gateway. It registers no task, runs no server, wraps no API of its own and keeps no upstream snapshot or fixture, and it depends on xippios-core alone. Its first record, ADR-0001, says what it holds and never holds.

What it holds

  • The api.data.gov gateway, xippios.usda.fas.data_gov: the key in DATA_GOV_API_KEY, sent in the X-Api-Key header, the gateway's documented answers as xippios-core errors that name the request sent, and one quota policy per process for the key, so that every source on the key spends one quota. The module holds nothing of FAS: a publisher's own answers come in through its answers hook.
  • FAS's answer for a year without data, xippios.usda.fas.no_data: NoDataForYear, for FAS's empty text/plain 404 on a source's data path, and the Gateway that the package exports, the gateway with that answer.
  • The kit of the FAS Open Data Services portal, xippios.usda.fas.portal, with which each source's scripts/refresh_upstream.py declares its documentation snapshot on core's frame: Portal(prefix) for the source's service and shell_text for a shell page of its own.

Install

uv add xippios-usda-fas

30-second example

A source imports the gateway's names from the package and the kit from its module:

from xippios.usda.fas import API_KEY_ENV, Gateway, NoDataForYear, REMAINING_HEADER

gateway = Gateway(SOURCE, data_path=DATA_PATH)  # in _client.py, the source's own data paths

from xippios.usda.fas.portal import Portal  # in scripts/refresh_upstream.py alone

PORTAL = Portal("/api/esr/")

Importing the package loads none of core's script frames. A source depends on it by xippios-usda-fas~=0.1.0, one minor.

Workflows

ci.yml runs ruff, its format check, mypy, pytest and pre-commit on Python 3.12, 3.13 and 3.14, requires a changelog entry of every pull request but Dependabot's and refuses a fixture file over 256 KiB that a pull request adds or changes. It runs on every pull request and, called by publish.yml, once for a release, and its job ci is the check the organization's ruleset requires. It is handed no secret, and no variable switches it off.

publish.yml is the release train (conventions §12): on a push to main whose pyproject.toml names a version that has no tag yet and has its section in CHANGELOG.md, it runs ci.yml, refuses a core pinned to git, tags the merge commit, builds the package and, once a reviewer of the environment pypi approves the run, publishes it to PyPI by trusted publishing. Every push to main and a dispatch start it, and a push that brings no release ends quietly. It is handed no secret: the step that tells a release is handed the job's token as GH_TOKEN, the tag goes with the job's token and PyPI trusts the workflow itself. Its job tag holds the one checkout of the repository that keeps its credentials, since it pushes the tag with the job's token; every other checkout sets persist-credentials: false (conventions §13). No variable switches it off.

conventions.yml calls the organization's review of a pull request against the documents listed under Documents below, the check conventions / conventions, when a pull request opens, is pushed to, reopens or is edited, and on a push to main or a dispatch the review of the range of commits, range / range. It hands the review the organization's secret of the model's key, by name. A variable WORKFLOW_CONVENTIONS of off, the repository's over the organization's, switches both off.

adr-index.yml calls the organization's check of the ADR index, adr-index / adr-index, which runs scripts/adr_index.py --check, when a pull request opens, is pushed to or reopens. It hands over nothing, and the called workflow reads its switch itself: a variable WORKFLOW_ADR_INDEX of off, the repository's over the organization's, skips the check.

siblings.yml runs .github/scripts/check-siblings.sh, which installs the wheel beside every sibling on PyPI under the same provider namespace that shares its core minor and beside the source packages it depends on, and proves that the namespace levels stay portions (sdk-core ADR-0006, sdk-core ADR-0021). It runs on every pull request and push to main, a check the ruleset does not require, in a workflow of its own, since ci.yml is core's file, which publish.yml calls for a release. It hands the script the job's read-only token as GITHUB_TOKEN, for the listing of the organization's repositories, since GitHub limits the calls of a runner without one. A variable WORKFLOW_SIBLINGS of off, the repository's over the organization's, switches it off.

Documents

  • sdk-core: docs/conventions.md — the conventions every xippios source package follows: its layout, names, results, tests and releases.
  • sdk-core: docs/adr.md — the index of the family's architecture decisions, which the conventions cite.
  • sdk-core: docs/definition-of-done.md — what a change satisfies before its pull request is opened.
  • sdk-core: docs/review-checklist.md — what the review of a pull request checks, in order.
  • sdk-core: docs/adr/0065-core-names-no-publisher.md — the gateway's leaving of xippios-core, and the sections of the conventions that bind a publisher's shared package.
  • sdk-usda-fas: docs/adr.md — the index of this package's own decisions, generated from the records in docs/adr/.

Licence

Apache-2.0. See LICENSE.

Metadata

Release files for xippios-usda-fas 0.1.0

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

Source distribution (sdist)

Source distribution for xippios-usda-fas 0.1.0
File Size Uploaded Provenance Actions
xippios_usda_fas-0.1.0.tar.gz 25.6 kB With provenance Details for xippios_usda_fas-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xippios-usda-fas 0.1.0
File Interpreter ABI Platform Actions
xippios_usda_fas-0.1.0-py3-none-any.whl Python 3 none any Details for xippios_usda_fas-0.1.0-py3-none-any.whl

Total release size: 48.9 kB

Release files / xippios_usda_fas-0.1.0.tar.gz

Download URL xippios_usda_fas-0.1.0.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
189d6325fb39e138e9d126f4dd3b4102ba8af41a2206ab139726a85979178f07
BLAKE2b-256 checksum
How to use checksums
13bbe0e76447c2d56d8f27f6ad41400f661ee35c52cfce131f6bd39868b64013
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 26, 2026.

Transparency log

Release files / xippios_usda_fas-0.1.0-py3-none-any.whl

Download URL xippios_usda_fas-0.1.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d4a53a4b16e560793fd87131eef8990b4d9c2cbeb534eda6cb710a6d32acc90
BLAKE2b-256 checksum
How to use checksums
7814e1100a004daa45504b0d8ecb11491812c53425c9239d4a8705f339b6c789
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 26, 2026.

Transparency log

Security for xippios-usda-fas 0.1.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.

Select from 2 files

Attestation for xippios_usda_fas-0.1.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 26, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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