Zero-dependency, pure-python wrapper for the PyPI JSON Web API
Project description
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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file otlet-1.0.0.post1.tar.gz
.
File metadata
- Download URL: otlet-1.0.0.post1.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c71eb97f19a9141fa00e82ac71759e97cad233904eb818e9db2c7bb782b2800 |
|
MD5 | c14cd6f2283ffe11f04a2efb5584e871 |
|
BLAKE2b-256 | f506787d379d79438b51a74cd8b146c38bc840dc5948d834111494ac2ec955aa |
File details
Details for the file otlet-1.0.0.post1-py3-none-any.whl
.
File metadata
- Download URL: otlet-1.0.0.post1-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3a3df7e89d31183f6f71cb042dc549d2dbe639afd3bd5f64806361f607a6ef2 |
|
MD5 | d35b024b17c8229c296e951e815a6f6c |
|
BLAKE2b-256 | 9920744f1983a43276b70947fc4980118154d74927213efdc53b5b4f01aa118f |