Catalog PyPI
Back to packageRELEASE DETAILS

0.1.6

PyPI

3scale-api-crd

3scale CRD Python Client

Published23 Jun 2025
Direct dependencies9
Transitive dependenciesNot calculated

README

Version 0.1.6 documentation

3scale-api-python-crd

3scale client uses CRs for object definition. CRs are processed by 3scale Operator.

Capabilities documentation

Installing

Install and update using pip:

pip install 3scale-api-crd

Or as a dependency using the pipenv

pipenv install 3scale-api-crd

Usage

Client supports basic CRUD operations and it generates CRs in Openshift namespace defined by oc session.

Basic usage of the client:

oc login
oc project example
import threescale_api_crd

client = threescale_api_crd.ThreeScaleClientCRD(url="myaccount.3scale.net", token="secret_token", ssl_verify=True, ocp_provider_ref="secret_with_credentials")

Using of objects are described in 3scale API client README.

Run the Smoke Tests

To run the tests you need to have installed development dependencies:

pipenv install --dev

and then run the pytest:

pipenv run pytest -m smoke

Integration tests configuration

To run the integration tests you need to set these extra env variables:

THREESCALE_PROVIDER_URL='https://example-admin.3scale.net'
THREESCALE_PROVIDER_TOKEN='<test-token>'

THREESCALE_MASTER_URL='https://master.3scale.net'
THREESCALE_MASTER_TOKEN='<test-master-token>'

and to have valid oc tool session to Openshift where 3scale Operator is deployed and watches for CRs.

By default: - oc namespace should be the namespace where 3scale instance is deployed - the system-seed secret is used by 3scale Operator client - THREESCALE_ variables are used for not implemented Threescale client features

If CRs are created in different namespace to 3scale deployment, env variable OCP_PROVIDER_ACCOUNT_REF can be specified with secret name used by 3scale Operator client, see https://github.com/3scale/3scale-operator/blob/master/doc/backend-reference.md#provider-account-reference

Finished integration unit tests

  • AccountUsers
  • Accounts
  • ActiveDocs
  • ApplicationPlans
  • BackendMappingRules
  • BackendMetrics
  • BackendUsages
  • Backends
  • Limits
  • MappingRules
  • Metrics
  • OpenApis
  • Policies
  • PolicyRegistries
  • PricingRules
  • Proxies
  • Services
  • Tenants
  • ProxyConfigPromote
  • Applications
  • Methods
  • ApplicationAuth

Command to run integration unit tests: pipenv run pytest --log-cli-level=10 -vvvv -s ./tests/integration/ |& tee x

TODO

  • do https://github.com/3scale/3scale-operator/pull/813
  • do not simulate app plan id
  • create unit integration tests for:
    • ProductDeploymentSpec
    • AuthenticationSpec
  • implement delete of policies + add unit tests
  • add proper error messages in case of for example missing required arguments, see test_should_fields_be_required
  • implement optimitazation on the oc level:
    • for every test run, label objects - oc label product.capabilities.3scale.net/testyrclkfzyhue test_run=new --overwrite
    • use only objects labeled by test run id - oc get product.capabilities.3scale.net --show-labels=true -l test_run=new

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 9

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
3scale-api
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
3scale-apiruntime
openshift-client
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
openshift-clientruntime
flake8
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
flake8; extra == "dev"runtime
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
mypy; extra == "dev"runtime
pylint
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
pylint; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
pytest; extra == "dev"runtime
python-dotenv
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
python-dotenv; extra == "dev"runtime
backoff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
backoff; extra == "dev"runtime
sphinx
Environment
{
  "extras": "",
  "marker": "extra == \"docs\"",
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
sphinx; extra == "docs"runtime

Distribution files

2 collected
3scale_api_crd-0.1.6-py3-none-any.whl

bdist_wheel · 51.91 KB · Python py3

Source file
3scale-api-crd-0.1.6.tar.gz

sdist · 41 KB · Python source

Source file

Repository

ACCESSIBLE
3scale-qe/3scale-api-python-crd

Shared repository data · GitHub

License detected in repository
Apache-2.0
License branch / ref
master
Last push
2 Mar 2026
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

4count
Gauge · observed snapshots22 Oct 2026
420
2026-10-22: 4 · observed 2026-10-22T14:30:06.0237956Z
22 Oct22 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2242026-10-22T14:30:06.0237956Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 15:36 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:5e5ba496cb2f6d66c72af27502e25a85158c6374b349c3e4e2c4e73811278df4

Other collected versions

View all collected versions →