Skip to main content

A Python library for interacting with Deps.dev API

Project description

PyDepsDev

A Python library for interacting with the Deps.dev API. Easily fetch package, version, and project data from the API.

Table of Contents

Installation

To install pydepsdev, simply run:

pip3 install pydepsdev

Usage

Initialization

Start by importing the library and initializing the main class:

from pydepsdev import DepsdevAPI

api = DepsdevAPI()

Fetching Data

The library provides methods that correspond to different endpoints in the Deps.dev API. Here's a breakdown of each method and how to use them:

  1. Get Package Information

    Fetch package details including available versions.

    package_info = await api.get_package("system_name", "package_name")
    
  2. Get Version Information

    Fetch detailed information about a specific package version.

    version_info = await api.get_version("system_name", "package_name", "version_number")
    
  3. Get Requirements

    Return the requirements for a specific package version. (Note: Only available for NuGet.)

    requirements = await api.get_requirements("NuGet", "package_name", "version_number")
    
  4. Get Dependencies

    Fetch the resolved dependency graph for a specific package version.

    dependencies = await api.get_dependencies("system_name", "package_name", "version_number")
    
  5. Get Project Information

    Retrieve details about projects hosted by platforms like GitHub, GitLab, or BitBucket.

    project_info = await api.get_project("project_id")
    
  6. Get Project Package Versions

    Fetch the package versions created from a specified source code repository.

    project_package_versions = await api.get_project_package_versions("project_id")
    
  7. Get Advisory Details

    Fetch information about a security advisory from OSV.

    advisory_info = await api.get_advisory("advisory_id")
    
  8. Query Package Versions

    Query package versions based on content hash or version key.

    package_versions = await api.query_package_versions(hash_type="type", hash_value="value", version_system="system_name", version_name="name", version="version_number")
    

Get more informating about the query parameters and response values on the official API documentation

Contributing

We welcome contributions! If you find a bug or have suggestions, feel free to open an issue or submit a pull request.

License

This project is licensed under the Apache Software License 2.0.

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

pydepsdev-0.1.1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

pydepsdev-0.1.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file pydepsdev-0.1.1.tar.gz.

File metadata

  • Download URL: pydepsdev-0.1.1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pydepsdev-0.1.1.tar.gz
Algorithm Hash digest
SHA256 85acded470e0d6139f60898af2d19ea410775b5ead2839be86e219362f5273ac
MD5 da8d239f5e5e4f327dee7450ec7d31d9
BLAKE2b-256 b614e8e8a005ff40d9cede4ce0a3726c47215b0fe3aefd839eb1ccb7e0acb7e1

See more details on using hashes here.

File details

Details for the file pydepsdev-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pydepsdev-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pydepsdev-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca216e136c95567b68d88317f144f53d6edb69b799ada6512fc33502d2a94613
MD5 6eafb88fe2ab75642f34fedf07ed7b36
BLAKE2b-256 2b740887f6edd4e317818285955fbc545d0b71a00ce4906fb60b335e60c79911

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