Skip to main content

A Python wrapper for the libraries.io API

Project description

Travis Status coveralls Documentation Status License Latest Release PyPI - Wheel PyPI - Python Version

Pybraries is a Python wrapper for the libraries.io API.

You can use it to subscribe to email alerts for new versions of open source packages.

You can also use it to find information about many aspects of open source packages and repositories.

The full documentation is hosted at Read the Docs.

Quick Start

Install

Install from PyPI.:

pip install pybraries

Use

Get your API key from libraries.io.

Set your API key as to the LIBRARIES_API_KEY environment variable from the command line with

export LIBRARIES_API_KEY="your_libraries.io_api_key_goes_here"

Import the pybraries package and use it to subscribe to a package.

from pybraries.subscribe import Subscribe

s = Subscribe()

s.subscribe("pypi", "pandas")

Now you’ll get an email update every time a new version of pandas is released.

Here’s another example. Search for projects with visualization as a keyword and python as a language. Sort by the number of stars.

from pybraries.search import Search

search = Search()

info = search.project_search(keywords='visualization', sort='stars', platform='pypi')
print(info)

A list of dictionaries with project names and other project information is returned.

Note that the Libraries.io API is rate limited to 60 requests per minute.

All libraries.io methods are implemented, except updating a subscription to not include prereleases. This option can be toggled at the libraries.io website.

Search() and Subscribe() are the two classes in this package. See all their available methods by clicking on the method names in the left sidebar in the documentation.

Key Terms

host

A repository host platform. e.g. GitHub

owner

A repository owner. e.g. pandas-dev

repo

A repository. e.g. pandas

user

A repository user e.g. a GitHub username. e.g. discdiver

platform

A package manager platform. e.g. PyPI

project

A package or library distributed by a package manager platform. e.g. pandas

Note that many repos and projects share the same name. Many owners and repos also share the same name. Further, many owners are also users. Fun! 😁

Pybraries methods that return one item generally return a dict with information.

Methods that return multiple items return a list of dicts.

Docs

Getting Help

1. Check out the pybraries docs. 1. Check out the libraries.io docs. 1. Open an issue on GitHub or tag a question on Stack Overflow with “pybraries”.

Contributing

  • Contributions are welcome and appreciated! See Contributing.

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

pybraries-0.3.4.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

pybraries-0.3.4-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file pybraries-0.3.4.tar.gz.

File metadata

  • Download URL: pybraries-0.3.4.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pybraries-0.3.4.tar.gz
Algorithm Hash digest
SHA256 a39a79325c20e205c12bc13a7ed03188b456543b1b4c99bd3200eaaa4765d8eb
MD5 f27908f709f44c464a02845cd050b90b
BLAKE2b-256 a7dade3283417e936c3e1e0e6e4cf72deb4a32b464f0729ccedc74b03e66a034

See more details on using hashes here.

File details

Details for the file pybraries-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: pybraries-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for pybraries-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5af2c511addadafd267c576e7f4eba47c0cd5cdd45d378f3e3ea7c89e3891aac
MD5 b3fab1807a7d98d6e65da0c10c37a494
BLAKE2b-256 03bfd198385735a973162c9e1781202f85f49cb469c7684a42e564b6b112fe44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page