Skip to main content

An extension for TRAC D.A.P. that loads models from PyPI or a compatible proxy

Project description

PyPI Extension for the TRAC Model Runtime

This extension allows TRAC to load models dynamically from PyPI repositories, or a compatible proxy such as Nexus or Artifactory.

  • Support for JSON, Simple JSON and Simple HTML query formats
  • Support for private repositories using tokens
  • Handles corporate firewalls, proxies and SSL

This extension is a pre-release and will be finalized inTRAC 0.10.

Installing

The HTTP extension can be installed with pip:

$ pip install tracdap-ext-pypi

The package has the following dependencies:

  • tracdap-runtime (version 0.10.0-beta2 or later)
  • urllib3 (optional, version 2.x)

Using the Git model repository

With the PyPI extension installed, you can add PyPI repositories as resources in sys_config.yaml like this:

resources:
  
  my_json_repository:
    resourceType: MODEL_REPOSITORY
    protocol: pypi
    properties:
      pipIndex: https://artifactory.mycompany.com/artifactory/api/pypi

  my_simple_repository:
    resourceType: MODEL_REPOSITORY
    protocol: pypi
    properties:
      pipIndexUrl: https://nexus.mycompany.com/repository/pypi/simple
      pipSimpleFormat: html

The examples show the use of both the JSON and Simple query formats. The particular query formats available and the paths for the index and index-url properties will depend on how your package server is configured. This information is often published along with other internal developer documentation to help set up a development environment (Look for the "index" or "index-url" settings when setting up other Python tools). Sometimes is is also visible in the web interface of the package server. If you can't find the settings you will need to contact your dev-ops team.

For the simple query format (i.e. an index configured with the "index-url" setting), there are two possible response formats: pipSimpleFormat: html or pipSimpleFormat: json. Use this setting to see what is available on your package server. For the JSON query format (i.e. an index configured with the "index" setting) there is only one response format available so this is not configurable.

To supply credentials, use either the username and password properties, or the token property. In production deployments these properties should be supplied using the TRAC secrets mechanism.

This extension assumes that packages on the package server are available as Python wheels.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tracdap_ext_pypi-0.10.0b4.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tracdap_ext_pypi-0.10.0b4-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file tracdap_ext_pypi-0.10.0b4.tar.gz.

File metadata

  • Download URL: tracdap_ext_pypi-0.10.0b4.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tracdap_ext_pypi-0.10.0b4.tar.gz
Algorithm Hash digest
SHA256 4468801d69859c15402e001482adb5c0e83bf3921e1e2aba40e2326156f61242
MD5 a5242dc9d9ecd03aad4ce9937b665a2a
BLAKE2b-256 4b1a89777639976b58776b55fdfe135503d6d2bb2e44866a7d588a583eb5df74

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracdap_ext_pypi-0.10.0b4.tar.gz:

Publisher: packaging.yaml on finos/tracdap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tracdap_ext_pypi-0.10.0b4-py3-none-any.whl.

File metadata

File hashes

Hashes for tracdap_ext_pypi-0.10.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 c396106312f337dc9e12b9a38d37301c495c7ea30ba2705b79235ff00bcf48c6
MD5 1efdeaf0fb493f103e13fc73cfc206f2
BLAKE2b-256 b0967f485e5dae27c4ef28c582b665a02cb119f4a35349eee95aa0db376ab049

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracdap_ext_pypi-0.10.0b4-py3-none-any.whl:

Publisher: packaging.yaml on finos/tracdap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page