Skip to main content

API discovery and endpoint inventory for the Klyrek ecosystem

Project description

klyrek-api

API discovery and endpoint inventory. Three independent, composable pieces:

  • openapi — parses an OpenAPI/Swagger JSON spec's paths object into Endpoint records (method, params, base path handled for both Swagger 2.0 basePath and OpenAPI 3.x servers[]).
  • discovery — probes a small, curated set of well-known paths where a spec or an API root commonly lives (/openapi.json, /swagger.json, /api/v1, ...), all scope-checked through klyrek-http.
  • graphql — probes common GraphQL paths with a minimal {__typename} query and confirms by the response shape ({"data": ...} / {"data": ..., "errors": ...}), not just a 200.

inventory.build_api_inventory() runs all of the above against a target and returns a deduplicated list[Endpoint]. classify.is_rest_like() is a separate, standalone heuristic for tagging URLs already discovered by klyrek-crawler as API-shaped (/api/, /v1/, numeric ID segments) without making any additional requests.

from klyrek_api.inventory import build_api_inventory

endpoints = build_api_inventory(client, "https://target.com/")

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

klyrek_api-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

klyrek_api-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file klyrek_api-0.1.0.tar.gz.

File metadata

  • Download URL: klyrek_api-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for klyrek_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 40499376830a7349e01b7c20c777769ef900aeb6da9288ad4f516e789eb9e390
MD5 b819d6dd76e317810dfaffa9d9c7e0f0
BLAKE2b-256 09612700d14c304d9077fb971b9e84c9d4ab933b7e5a58434692fd9347d03234

See more details on using hashes here.

File details

Details for the file klyrek_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: klyrek_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for klyrek_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c654cc9c7946e28a798b3cbc42d3ea161460e903b69829c5dc12964bed846bb
MD5 6f95d379e933ca9b2a5baa482e4006e1
BLAKE2b-256 b034bb12824bf909acce7361387b3ca41f8770ec74c9148bc85783684dfbe4c0

See more details on using hashes here.

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