Git Product home page Git Product logo

thenounprojectapi's Introduction

Build Status Language grade: Python codecov license

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/tomaarsen/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.

# See the Documentation for more information: https://tomaarsen.github.io/TheNounProjectAPI
from TheNounProjectAPI import API

if __name__ == "__main__":
    # API Key and Secret from https://api.thenounproject.com/getting_started.html#creating-an-api-key
    key = "<my api key>"
    secret = "<my api secret>"
    
    # Create api object
    api = API(key=key, secret=secret)

    # See the documentation for more endpoints
    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.


Documentation

Documentation can be found here: https://tomaarsen.github.io/TheNounProjectAPI


Tests

Run python runner.py, nosetests, python setup.py nosetests or python setup.py test to run all tests in one batch.


License

TheNounProjectAPI is licensed under MIT.


Contributions

Contributions are welcome.

thenounprojectapi's People

Contributors

tomaarsen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.