Python TheNounProject API Wrapper.
Project description
TheNounProjectAPI
TheNounProjectAPI is a Python wrapper allowing convenient access to the Noun Project API. It supports all endpoints and types of responses. Documentation for this wrapper can be found here, while the official documentation of the API itself may be found here.
Installation
TheNounProjectAPI is supported on Python 3.7+. The recommended method of installation is via pip.
pip install TheNounProjectAPI
You can also install TheNounProjectAPI directly from github using:
pip install --upgrade https://github.com/CubieDev/TheNounProjectAPI/archive/master.zip
For help with installing Python and/or pip, see "The Hitchhiker's Guide to Python" Installation Guides
Getting started
It's strongly encouraged to use the documentation's Getting started section to get started, as it's tied to the rest of the documentation, allowing you to quickly find exactly what you need.
However, I'll provide a quick sample.
import TheNounProjectAPI
key = "<sample key>"
secret = "<sample secret>"
api = TheNounProjectAPI(key=key, secret=secret)
icons = api.get_icons_by_term("goat", public_domain_only=True, limit=2)
# >>>icons
# [<IconModel: Term: Goat Feeding, Slug: goat-feeding, Id: 24014>,
# <IconModel: Term: Herbivore teeth, Slug: herbivore-teeth, Id: 675870>]
for icon in icons:
print("Icon's term:", icon.term)
print("This icon's tags:", ", ".join(tag.slug for tag in icon.tags))
print("Uploader's username:", icon.uploader.username)
Examine the TheNounProjectAPI documentation for more examples of what can be done with TheNounProjectAPI.
Tests
Run run_tests.py
or perform python setup.py test
to run all tests in one batch.
License
TheNounProjectAPI is licensed under MIT.
Contributions
Contributions are welcome.
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
Built Distribution
File details
Details for the file TheNounProjectAPI-1.0.2.tar.gz
.
File metadata
- Download URL: TheNounProjectAPI-1.0.2.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a8d37d83055302b7d57982cca3fc27d7d04fad135ca1b6fe5e148a7392bfbdd |
|
MD5 | 778a686769b5e30d8cd46d6be6b6388e |
|
BLAKE2b-256 | b217de900b8e77aa9e24d45eb377a04118442739888fdf65bceed2e601d84665 |
File details
Details for the file TheNounProjectAPI-1.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: TheNounProjectAPI-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61ce2231d725fe9ac4b24b99855ec6925deab32679ebc7da2f7314b9f84fb0f1 |
|
MD5 | f1ead138cc3150bb7b6b26a0856455b0 |
|
BLAKE2b-256 | 709540f872f35e4bd2090581384d0cf1134e9eac42c372168217218851496e80 |