All Projects → PokeAPI → Pokebase

PokeAPI / Pokebase

Licence: bsd-3-clause
Python 3 wrapper for Pokéapi v2

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pokebase

Vue Axios
A small wrapper for integrating axios to Vuejs
Stars: ✭ 1,887 (+1806.06%)
Mutual labels:  wrapper, hacktoberfest
Libfaketime
libfaketime modifies the system time for a single application
Stars: ✭ 1,932 (+1851.52%)
Mutual labels:  wrapper, hacktoberfest
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (+22.22%)
Mutual labels:  wrapper, hacktoberfest
Pswritecolor
Write-Color is a wrapper around Write-Host allowing you to create nice looking scripts, with colorized output.
Stars: ✭ 78 (-21.21%)
Mutual labels:  wrapper, hacktoberfest
Pokedex Promise V2
An easy way to use pokeapi v2 with promises in node.js
Stars: ✭ 315 (+218.18%)
Mutual labels:  wrapper, hacktoberfest
Canvasapi
Python API wrapper for Instructure's Canvas LMS. Easily manage courses, users, gradebooks, and more.
Stars: ✭ 306 (+209.09%)
Mutual labels:  wrapper, hacktoberfest
Pokeapi Js Wrapper
PokeAPI browser wrapper, fully async with built-in cache
Stars: ✭ 129 (+30.3%)
Mutual labels:  wrapper, hacktoberfest
Physx Rs
🎳 Rust binding and wrapper over NVIDIA PhysX 🦀
Stars: ✭ 310 (+213.13%)
Mutual labels:  wrapper, hacktoberfest
Imgui Go
Go wrapper library for "Dear ImGui" (https://github.com/ocornut/imgui)
Stars: ✭ 499 (+404.04%)
Mutual labels:  wrapper, hacktoberfest
Aiovk
vk.com API python wrapper for asyncio
Stars: ✭ 85 (-14.14%)
Mutual labels:  wrapper, hacktoberfest
Conference Hall
📣 An open SaaS platform to manage call for papers
Stars: ✭ 97 (-2.02%)
Mutual labels:  hacktoberfest
Greeter
Login and Lock Screen greeter for elementary OS and Pantheon, using LightDM
Stars: ✭ 96 (-3.03%)
Mutual labels:  hacktoberfest
Zebra database
A compact, lightweight and feature-rich PHP MySQLi database wrapper
Stars: ✭ 98 (-1.01%)
Mutual labels:  wrapper
Emage
🧙‍♂️ From developers to developers: a cross-platform tool for losslessly image compression.
Stars: ✭ 99 (+0%)
Mutual labels:  hacktoberfest
Stepbarview
Step Bar View (make your own customized StepBar)
Stars: ✭ 97 (-2.02%)
Mutual labels:  hacktoberfest
Binance.api.csharp.client
C#.NET client for Binance Exchange API.
Stars: ✭ 98 (-1.01%)
Mutual labels:  wrapper
Phpstan Drupal
Extension for PHPStan to allow analysis of Drupal code.
Stars: ✭ 97 (-2.02%)
Mutual labels:  hacktoberfest
Infinitycrawler
A simple but powerful web crawler library for .NET
Stars: ✭ 97 (-2.02%)
Mutual labels:  hacktoberfest
Essentials
Essential cross platform APIs for your mobile apps.
Stars: ✭ 1,344 (+1257.58%)
Mutual labels:  hacktoberfest
Spin
Spinnaker CLI
Stars: ✭ 99 (+0%)
Mutual labels:  hacktoberfest

=================== Pokebase |swampert|

|travis| |pypi|

pokebase is a simple but powerful Python interface to the PokéAPI database <https://pokeapi.co/>_

Maintainer: GregHilmes <https://github.com/GregHilmes>_

========= Important

pokebase is under heavy construction right now, in order to clean up the code and make it easier to maintain. I recommend you continue using version 1.3.0, download via pip. Once these new changes are stable, there will be another PyPI release.

Installation

pip install pokebase

It can't get much easier than that.

Pokebase has been tested against Python 3.6 and Python 3.6 only. If this is too old for your needs, see the above note about the construction. Pokebase may function under other version of Python, but bugs may occur.

Usage

import pokebase as pb chesto = pb.APIResource('berry', 'chesto') chesto.name 'chesto' chesto.natural_gift_type.name 'water' charmander = pb.pokemon('charmander') # Quick lookup. charmander.height 6

Now with sprites! (again!)

s1 = pb.SpriteResource('pokemon', 17) <pokebase.interface.SpriteResource object at 0x7f2f15660860> s1.url 'https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/17.png' s2 = pb.SpriteResource('pokemon', 1, other_sprites=True, official_artwork=True) s2.path '/home/user/.cache/pokebase/sprite/pokemon/other-sprites/official-artwork/1.png' s3 = pb.SpriteResource('pokemon', 3, female=True, back=True) s3.img_data b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 ... \xca^\x7f\xbbd*\x00\x00\x00\x00IEND\xaeB`\x82'

... And it's just that simple.

Version Support

pokebase currently (officially) supports Python 3.6

Nomenclature

  • an endpoint is the results of an API call like http://pokeapi.co/api/v2/berry or http://pokeapi.co/api/v2/move
  • a resource is the actual data, from a call to http://pokeapi.co/api/v2/pokemon/1

Testing

Python unittests are in a separate tests directory, and can be run via python -m tests.

Notes to the developer using this module

The quick data lookup for a Pokémon type, is pokebase.type_('type-name'), not pokebase.type('type-name'). This is because of a naming conflict with the built-in type function, were you to from pokebase import *.

When changing the cache, avoid importing the cache constants directly. You should only import them with the whole cache module. If you do not do this, calling set_cache will not change your local copy of the variable.

NOT THIS!

from pokebase.cache import API_CACHE

Do this :)

from pokebase import cache cache.API_CACHE

.. |swampert| image:: https://veekun.com/dex/media/pokemon/main-sprites/heartgold-soulsilver/260.png :target: https://pokeapi.co/api/v2/pokemon/swampert

.. |travis| image:: https://travis-ci.org/PokeAPI/pokebase.svg?branch=master :target: https://travis-ci.org/PokeAPI/pokebase

.. |pypi| image:: https://img.shields.io/badge/pypi-1.3.0-blue.svg :target: https://pypi.python.org/pypi/pokebase

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].