Skip to main content

Zero-dependency, pure-python wrapper for the PyPI JSON Web API

Project description

otlet readme image
Zero-dependency, pure-python wrapper for the PyPI JSON Web API.

Documentation Status license-mit build-workflow github-issues github-pull-requests pypi-python-versions pypi-package-version

Installing

Otlet supports Python 3.6 and above, but at least Python 3.8 is recommended.

The simplest method is installing otlet from PyPI using pip:

pip install -U otlet

Examples

Print a list of available versions for a package:

from otlet.api import PackageObject

pkg = PackageObject("pygame")
print("All available versions for pygame:")
for ver in pkg.releases:
    print(ver)

Print a list of a dependency's dependencies:

from otlet.api import PackageObject

pkg = PackageObject("Sphinx")
requests = pkg.dependencies[13]
requests.populate()
print("All dependencies of the 'Sphinx' dependency, 'requests':")
for dep in requests.dependencies:
    print(dep.name)

Development

If you plan to contribute to otlet and clone the repository, make sure you have installed the Poetry dependency management system, then run the following commands to set up your environment:

poetry install # to set up virtualenv, and install all dev dependencies
git config --local core.hooksPath .githooks/ # add otlet's hooks to your local repo config

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

otlet-1.0.0.post1.tar.gz (20.4 kB view hashes)

Uploaded Source

Built Distribution

otlet-1.0.0.post1-py3-none-any.whl (25.6 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