Skip to main content

Client python package for interaction with APIClarity.

Project description

Python APIClarity client

GitHub Actions status Code style: Black

Python client package for APIClarity interaction.

APIClarity is a modular tool that addresses several aspects of API Security, focusing specifically on OpenAPI based APIs. APIClarity approaches API Security in 2 different ways:

  • Captures all API traffic in a given environment and performs a set of security analysis to discover all potential security problems with detected APIs
  • Actively tests API endpoints to detect security issues in the implementation of such APIs.

Usage

The ClientSession class is based on requests.Session and can be used similarly. To configure the session, provide a ClientSettings object:

from apiclarity import ClientSession, ClientSettings

apiclarity_session = ClientSession(ClientSettings(
    apiclarity_endpoint="http://apiclarity",
    default_timeout=(9.0, 3.0),
))
apiInfo = apiclarity_session.getInventory()
for api in apiInfo.items:
    print(f"received: {api}\n")

The settings can also be retrieved from the environment during creation of the ClientSettings object, given here with the defaults:

APICLARITY_ENDPOINT="http://apiclarity:8080"
TELEMETRY_ENDPOINT="http://apiclarity:9000"
HEALTH_ENDPOINT="http://apiclarity:8081"

Contributing

Pull requests and bug reports are welcome. Please see CONTRIBUTING.md.

License

The code is released under the Apache 2.0 License.

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

apiclarity-0.2.0.tar.gz (16.5 kB view hashes)

Uploaded Source

Built Distribution

apiclarity-0.2.0-py3-none-any.whl (17.9 kB view hashes)

Uploaded Python 3

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