Skip to main content
Metaport Logo

Pipeline Status Latest Release Python Software License Test Coverage Docs

What is this?

A client library which connects any Python app to a Metaport server using the CycloneDX SBOM standard for data interchange.

How to use

Introduction

The library will automatically generate an SBOM for your app, submit it to Metaport and subsequently delete it. Data can be sent using the HTTP or Email transports. See the docs site for example requests.

When installed in a Python project, the library provides a single executable metaport. It's designed to be invoked on a schedule via cron from within an application's production environment or as part of a CI/CD pipeline.

This library supports traditional Pip, Poetry, and Pipfile based projects.

Vulnerabilities will be reported by this agent to your Metaport server by invoking the following commands (and in this order):

  1. poetry audit
  2. pip-audit

If neither command is available, no vulnerability data will be sent when using --classic=1. If however vulnerability data is required, consider running a side-by-side instance of DependencyTrack, and configuring Metaport with it for dependencies and vulnerabilities (and without passing --classic=1).

Requirements

This package requires Python 3.12+. If used as part of a CI/CD setup, it can be installed as a throwaway dependency via Poetry's --dev switch ala poetry add --dev, or as a permanent dependency of your application.

Install

  1. Poetry

As part of production apps:

poetry add metaport-agent-python
  1. Pip
pip install metaport-agent-python
  1. Environment Variables

There are some environment variables which need to be set before the lib will operate correctly. Please see the docs site for more detailed installation and configuration instructions and examples.

Supported Frameworks and CMS's

Yours not listed? Contributions are very welcome. Please file an issue and issue a Merge Request, it's a one-line file change!

The following frameworks do not currently share life-cycle information:

Development Setup

Virtual Environment

# Create virtual environment
python -m venv .venv

# Activate virtual environment
# On Linux/macOS:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

# Install development dependencies
pip install -r requirements-dev.txt

Using Poetry

# Install Poetry if not already installed
pip install poetry

# Install dependencies
poetry install

# Install dev-dependencies
./venv/bin/poetry install --extras dev

# Activate virtual environment
poetry shell

Metadata

Release files for metaport-agent-python 1.1.2

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

Source distribution (sdist)

Source distribution for metaport-agent-python 1.1.2
File Size Uploaded
metaport_agent_python-1.1.2.tar.gz 41.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metaport-agent-python 1.1.2
File Interpreter ABI Platform
metaport_agent_python-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 92.8 kB

Release files / metaport_agent_python-1.1.2.tar.gz

Download URL metaport_agent_python-1.1.2.tar.gz
Size 41.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f565434f14b2fb68e1d087c25e662eecc406ac9701850f4de955b248a844b295
BLAKE2b-256 checksum
How to use checksums
c0bea4d5086fb14dd18db2a61267283e129d895fadabc8ef6d7200a9d394c533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / metaport_agent_python-1.1.2-py3-none-any.whl

Download URL metaport_agent_python-1.1.2-py3-none-any.whl
Size 51.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d00ed89d1ca3732096b1309cc1ba333633d92acf7b9b44fe77506789d78e983e
BLAKE2b-256 checksum
How to use checksums
4be98d645ee01849e9c9f75231c30b97c7c21b45cf6206aedd22f51843ca47f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.0.19

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

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