Dragon-Ball-API
Api unofficial de dragon ball inspirado en su fandomhttps://dragonball.fandom.com/es/wiki/Dragon_Ball_Wiki_Hispano. Esta api nos permite obtener datos de personajes, sagas, fusiones, lugares y videojuegos de manera sencilla. Para poder utilizarlo en nuestras aplicaciones.
Requerimientos
Para instalar los requerimientos instale los requerimientos del archivo requirements.txt con el siguiente comando
pip install -r requirement.txt
Importaciones
from DragonBall.Data.Characters import Characters
from DragonBall.Data.Sagas import Sagas
from DragonBall.Data.Planets import Planets
from DragonBall.Data.Fusions import Fusions
from DragonBall.Data.VideoGames import VideoGames
from DragonBall.OutInformation import OutInformation
Instalación
pip install Dragon-Ball-API
Usage
>>> from DragonBall.Data.Characters import Characters
>>> search_goku = Characters('Goku')
>>> search_goku.character_information()
{
'name': 'Son Goku', 'image': 'https://example.com', 'description': 'descripcion',
'names': {'japan_name': '...', 'latin_name': '...', 'pronunciation_name': '...', 'other_names': '...'},
'data': {'gender': '...', 'birthday': '...', 'origin': '...', 'family': ['...','...'], 'transformations': ['...', '...'], etc.. },
'debut': {'sagas': [{'title': '...', 'url': '...'}], 'debut': '...'}
}
Algunos personajes tendran más datos que otros. Eso dependera de la información que se encuentre en la wiki de dragon ball en ese momento. Si deseamos podemos pasar una lista de personajes a buscar y usar el método list para devolvernos la información de todos los personajes.
>>> from DragonBall.Data.Characters import Characters
goku_family = ['Son Gohan (abuelo)', 'Bardock', 'Gine', 'Raditz', 'Rey Gyuma', 'Milk', 'Gohan', 'Goten', 'Mr. Satán', 'Videl', 'Pan', 'Son Goku Jr.']
>>> character_list = Characters.character_list(goku_family)
[{'...'},{'...'}]
Podemos ver una lista de los personajes usando el método list de la clase. De la siguiente manera.
>>> Characters.list()
{
'Personajes por raza': ['Androides', 'Animales', 'Arlianos', 'Ángeles', '...', '...'],
'Personajes por asociación': ['...', '...', '...']
}
Si queremos imprimir los datos de manera más legible podemos utilizar el método beautiful_print_dict de la clase OutInformation
>>> OutInformation.beautiful_print_dict(Characters.list())
"Personajes por raza": [
"Androides",
"Animales",
"Arlianos",
"Ángeles",
"..."
]
Todos estos metodos los podemos aplicar en todas sus clases (sagas, juegos, etc).
Metadata
Release files for Dragon-Ball-API 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Dragon-Ball-API-1.0.0.tar.gz | 7.3 kB | Without provenance | Details for Dragon-Ball-API-1.0.0.tar.gz |
Release files / Dragon-Ball-API-1.0.0.tar.gz
| Download URL | Dragon-Ball-API-1.0.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
497d786d64e7a6d5c4070bfebee80452247edf713207726b6b272a2a435c0a88
|
|
BLAKE2b-256 checksum How to use checksums |
6276fc54e9bff4a580e9bddc4cc192734395f1eee4b0342c17f58917f6249751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for Dragon-Ball-API 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.