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.0rc1.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.0rc1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tracdap_ext_pypi-0.10.0rc1.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.0rc1.tar.gz
Algorithm Hash digest
SHA256 f61a391b34aff74ce6f383af500ad4cc4a2908693f61e8a3835cd791f11d5c75
MD5 7a77331d431d3a133923a0707ea64a2f
BLAKE2b-256 934b23e2edb4e0d511986d1a438a14f487a19cbe46df7c35c55acc6f00a198c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracdap_ext_pypi-0.10.0rc1.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.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for tracdap_ext_pypi-0.10.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 a67bdf8fcb29064baf7995ea5baa1498c7812953efc53c13d8851c2f1f7005e1
MD5 f0a428a7e332d265caae8064e7b06b99
BLAKE2b-256 4e1566a5dacc3cefe7fa1aa4fb2cd5f07f64acee82262b1c4c46b35fa9b7a2a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracdap_ext_pypi-0.10.0rc1-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