Skip to main content

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

Project description

One Pyece

PyPI - Python Version PyPI GitHub Workflow Status PyPI - License GitHub last commit

forthebadge forthebadge

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-1.0.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distributions

onepyece-1.0.0-py3.9.egg (11.3 kB view details)

Uploaded Source

onepyece-1.0.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for onepyece-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c8f1bbd17e060af1c2b61fdc037cc77579cef8c0b6dd64bf594b59f2eb2c6a56
MD5 57f5051766506ab67cab6b5addf90d1e
BLAKE2b-256 b7e77be83d7920e49099670071f03ffebd4b4a2b1bedcc089f4b362b0e8226c7

See more details on using hashes here.

File details

Details for the file onepyece-1.0.0-py3.9.egg.

File metadata

  • Download URL: onepyece-1.0.0-py3.9.egg
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.4

File hashes

Hashes for onepyece-1.0.0-py3.9.egg
Algorithm Hash digest
SHA256 f2d780b036ec8b2c05d546805595ad3e93ec9fa757c6e281d0d44e85dcb7db71
MD5 010d9f8262015450eb58788f511e2642
BLAKE2b-256 560af0ba701112d71ddc98d9bd01abb5216eb072f17f4ca70f08c60a39504738

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for onepyece-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7718b25c4e503404353992afb33383345d11f6cb90f7388ff526b81600c98161
MD5 d45b1d6795ee4fc25846d737f77228fc
BLAKE2b-256 20fe3243e2b46054a85d3c45a826612a6a008faeed6137776cc3c08086c4e222

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