Skip to main content

A package to use the One-Piece API : https://api-onepiece.com/

Project description

One Pyece

Python API wrapper for https://api-onepiece.com/ Thank's to this package you can simply get informations about One Piece characters, fruits, crews, etc. Learn more about possibilities in the Usage section. This package is still in development, so it may not be stable.

Installation

There are several solutions :

  • Use this command pip install git+https://github.com/icepick4/onepyece to download it from this repo.
  • [⚠️COMING SOON] Download either the .zip or the tar.gz archive from the last release and then use this command pip install <path_to_archive>

Usage

>>> import onepyece as op
>>> sanji = op.character_by_name('sanji') # You can get a character by its name
>>> sanji.birthday
'2000-03-02'
>>> nb_fruits = op.count_fruits() # You can get the count of a specific endpoint
>>> nb_fruits.count
197
>>> nb_fruits.url
https://api.api-onepiece.com/fruits/count
>>> crews = op.API('crews') # List of all the crews in dict form as you can see below
>>> crews.results[0]
{'id': 1, 'french_name': 'L’équipage du Chapeau de Paille', 'roman_name': 'Mugiwara no Ichimi', 'description': '', 'total_prime': 
'3.161.000.100', 'number': '10', 'status': 'actif', 'isYonko': True, 'affiliation': ''}
>>> crews.count # You can implicitly get the count of an endpoint by getting the whole list of it.
149

To get more basics functions visit that file which contains them, otherwise you can simply create API objects.

Tests

You can test the application by running python -m tests

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

onepyece-0.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

onepyece-0.0.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file onepyece-0.0.2.tar.gz.

File metadata

  • Download URL: onepyece-0.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.4

File hashes

Hashes for onepyece-0.0.2.tar.gz
Algorithm Hash digest
SHA256 68c3bc49bb4903584a093691362253e082c123a613ca974de05c3f3462525388
MD5 eb6b1fdd675da33e750720c1d5e68728
BLAKE2b-256 27ee707ae9b99d43bd43db572d8e23984fb4323923b71f411eaca9888ee1b8b9

See more details on using hashes here.

File details

Details for the file onepyece-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: onepyece-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.4

File hashes

Hashes for onepyece-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b5eaeff76c5ecb517c3957e8d3f6e600a6ee726d4db0abd87ae6e4e35ea7df77
MD5 4f48664b44af056529f9dde3ecc5106d
BLAKE2b-256 9e61837e9e5a47fd7826c06527814d2a9ae9b47c349f9655279f4cbab9431135

See more details on using hashes here.

Supported by

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