Giter VIP home page Giter VIP logo

aiopokeapi's Introduction

AioPokéApi

An Asynchronous API wrapper for the PokéApi written in Python.

Report issue · Request feature · Fork project

🗝️ Key Features

  • Use of modern Python keywords: async and await.
  • Every object is fully type hinted.
  • Objects get cached, this increases speed and avoids unnecessary API requests.

🌍 Documentation

AioPokéApi has a very minimal website, which you can find here. It also has some documentation.

☄️ Installation

pip install aiopokeapi
⚙️ Didn't work?

Depending on your Python installation, you might need to use one of the following:

  • Python is not in PATH

    path/to/python.exe -m pip install aiopokeapi
  • Python is in PATH but pip is not

    python -m pip install aiopokeapi
  • Unix systems can use pip3/python3 commands

    pip3 install aiopokeapi
    python3 -m pip install aiopokeapi
  • Using multiple Python versions

    py -m pip install aiopokeapi

🚀 Getting started

Aiopoke's goal is to be simple and easy to use:

import asyncio
import aiopoke

async def main():
   client = aiopoke.AiopokeClient()

   ability = await client.get_ability(1)
   generation = await ability.generation.fetch()

   await client.close()

asyncio.run(main())

Or even better, using a context manager:

# in main()
async with aiopoke.AiopokeClient() as client:
   ability = await client.get_ability(1)
   generation = await ability.generation.fetch()

aiopokeapi's People

Contributors

beastmatser avatar dependabot[bot] avatar deleca7755 avatar sparta142 avatar joennespreuwers avatar padilin 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.