Skip to main content

Python API Client for Traffic Control

Project description

This is the Traffic Ops Python Client for Python 3.x.

Installation

The official installation method is to use pip to install directly from from GitHub.

pip install git+https://github.com/apache/trafficcontrol.git#"egg=trafficops&subdirectory=traffic_control/clients/python"

# or
# pip install git+ssh://git@github.com/apache/trafficcontrol.git#"egg=trafficops&subdirectory=traffic_control/clients/python"

Local Installation

The preferred method is to use pip to install locally. Starting from the repository’s root directory, the following script should do the job:

cd traffic_control/clients/python
pip install .

# The above will install using the system's default Python interpreter - to use a specific
# version it will be necessary to specify the interpreter and pass the 'pip' module to it.
# e.g. for the system's default Python 2 interpreter, typically one would do:
# sudo -H /usr/bin/env python3 -m pip install .

# Developers may wish to use the '-e' flag. This will install the package 'edit-ably',
# meaning that changes made to the package within the repository structure will be effected on
# the system-wide installation.
# sudo -H pip install -e .

# If your system does not have 'pip', but does (somehow) have 'setuptools' as well
# as the package's dependencies, you can call 'setup.py' directly to install the
# package for the system's default Python 3 interpreter
# sudo -H ./setup.py install

The local installation method requires pip and setuptools. setuptools should be installed if your system has pip, but if you are missing either of them they can both be relatively easily installed with Python standard libraries.

# Here I'm using 'python' because that points to a Python 3 interpreter on my system. You may
# wish to use 'python3' instead.
sudo -H python -m ensure_pip
sudo -H python -m pip install -U pip

# If your system's 'python' already has 'pip', then you may skip to this step to
# install only 'setuptools'
sudo -H python -m pip install setuptools

Development Dependencies

To install the development dependencies, first ensure that your system has pip and setuptools then use pip to install the development environment.

pip install -e .[dev]

Versioning

The trafficops.__version__ module contains only the __version__ “constant” which gives the version of this Apache-TrafficControl package and not the version of Apache Traffic Control for which it was made. The two are versioned separately, to allow the client to grow in a version-controlled manner without being tied to the release cadence of Apache Traffic Control as a whole.

Version 3.0 is supported for use with Apache Traffic Control versions 7.0 and 6.1. New functionality will be added as the Traffic Ops API evolves, but changes to this client will remain non-breaking for existing code using it until the next major version is released.

Project details


Download files

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

Source Distribution

Apache-TrafficControl-3.1.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

Apache_TrafficControl-3.1.0-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file Apache-TrafficControl-3.1.0.tar.gz.

File metadata

  • Download URL: Apache-TrafficControl-3.1.0.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for Apache-TrafficControl-3.1.0.tar.gz
Algorithm Hash digest
SHA256 79b377d105e4918395f591fa0afd9d07ac92c2d3c7d57016c286eaaa5cb43f79
MD5 1ee1ba75fa028106daa417b8ab6489fa
BLAKE2b-256 0cbb945723848bce4f3bdfefaa46748ceef931537a2b1d0515e4ec96411c5296

See more details on using hashes here.

File details

Details for the file Apache_TrafficControl-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: Apache_TrafficControl-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for Apache_TrafficControl-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c226629b7c8b3ea6bf3cf4ba69733bfadaf92b676c0936789746210f066d3a3
MD5 471f80ddb947c0a34f40a2965a60914e
BLAKE2b-256 025d15d2fd2e3aadec6c62227cf519053cb0786a7ddce373ab07957016277025

See more details on using hashes here.

Supported by

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