Name | starwarsdata JSON |
Version |
0.0.1
JSON |
| download |
home_page | https://github.com/codewithwan/starwarsdata |
Summary | This Python library interacts with the Star Wars Galaxy API, allowing users to retrieve information about characters, films, and more from the Star Wars universe. |
upload_time | 2023-11-19 14:05:26 |
maintainer | |
docs_url | None |
author | codewithwan |
requires_python | |
license | MIT |
keywords |
data
starwars
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Star Wars Galaxy API
Proyek ini berinteraksi dengan Star Wars Galaxy API untuk mengambil informasi tentang karakter dan menyimpannya ke dalam file teks.
## Penggunaan Class `StarWarsGalaxyAPI`
Untuk menggunakan class `StarWarsGalaxyAPI`, Anda dapat melakukan langkah-langkah berikut:
1. Import kelas tersebut ke dalam kode Python Anda:
```python
from starwarsdata.starwars import StarWarsGalaxyAPI
```
2. Buat objek dari kelas `StarWarsGalaxyAPI`:
```python
sw_api = StarWarsGalaxyAPI()
```
3. Gunakan metode yang disediakan oleh kelas `StarWarsGalaxyAPI`:
- `get_person(person_id)`: Mendapatkan informasi tentang karakter berdasarkan ID karakter.
- `get_film(film_id)`: Mendapatkan informasi tentang film berdasarkan ID film.
- `search_person_by_name(name)`: Mencari karakter berdasarkan nama.
Pastikan untuk mengganti ID karakter atau nama yang digunakan dalam contoh penggunaan dengan nilai yang sesuai dari API.
## API
Python Basic API wrapper
```http
https://swapi.dev/
```
## Installation
Install my-project with npm
```bash
pip install starwarsdata
```
## Notes
- Class `StarWarsGalaxyAPI` berinteraksi dengan Star Wars Galaxy API untuk mengambil informasi karakter.
- Data yang diambil disimpan dalam `starwars_data.txt`.
## Usage
Basic Usage :
```python
from starwars import StarWarsGalaxyAPI
# Create an instance of StarWarsGalaxyAPI
sw_api = StarWarsGalaxyAPI()
# Get information about a character
luke_skywalker = sw_api.get_person(1)
print(luke_skywalker)
# Get information about a film
a_new_hope = sw_api.get_film(1)
print(a_new_hope)
```
## Authors
- [@codewithwan](https://github.com/codewithwan)
Raw data
{
"_id": null,
"home_page": "https://github.com/codewithwan/starwarsdata",
"name": "starwarsdata",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "data,starwars",
"author": "codewithwan",
"author_email": "<deezerxstore@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/9b/fe/f2ddd64f4d87598d765ef865964d5f2fc466edabcd8605ae5db99b0fc0d4/starwarsdata-0.0.1.tar.gz",
"platform": null,
"description": "# Star Wars Galaxy API\r\n\r\nProyek ini berinteraksi dengan Star Wars Galaxy API untuk mengambil informasi tentang karakter dan menyimpannya ke dalam file teks.\r\n## Penggunaan Class `StarWarsGalaxyAPI`\r\n\r\nUntuk menggunakan class `StarWarsGalaxyAPI`, Anda dapat melakukan langkah-langkah berikut:\r\n\r\n1. Import kelas tersebut ke dalam kode Python Anda:\r\n\r\n ```python\r\n from starwarsdata.starwars import StarWarsGalaxyAPI\r\n ```\r\n\r\n2. Buat objek dari kelas `StarWarsGalaxyAPI`:\r\n\r\n ```python\r\n sw_api = StarWarsGalaxyAPI()\r\n ```\r\n\r\n3. Gunakan metode yang disediakan oleh kelas `StarWarsGalaxyAPI`:\r\n\r\n - `get_person(person_id)`: Mendapatkan informasi tentang karakter berdasarkan ID karakter.\r\n - `get_film(film_id)`: Mendapatkan informasi tentang film berdasarkan ID film.\r\n - `search_person_by_name(name)`: Mencari karakter berdasarkan nama.\r\n\r\nPastikan untuk mengganti ID karakter atau nama yang digunakan dalam contoh penggunaan dengan nilai yang sesuai dari API.\r\n\r\n## API \r\nPython Basic API wrapper\r\n```http\r\n https://swapi.dev/\r\n```\r\n\r\n## Installation\r\n\r\nInstall my-project with npm\r\n\r\n```bash\r\n pip install starwarsdata\r\n```\r\n \r\n\r\n## Notes\r\n\r\n- Class `StarWarsGalaxyAPI` berinteraksi dengan Star Wars Galaxy API untuk mengambil informasi karakter.\r\n- Data yang diambil disimpan dalam `starwars_data.txt`.\r\n\r\n## Usage\r\n\r\nBasic Usage :\r\n\r\n```python\r\nfrom starwars import StarWarsGalaxyAPI\r\n\r\n# Create an instance of StarWarsGalaxyAPI\r\nsw_api = StarWarsGalaxyAPI()\r\n\r\n# Get information about a character\r\nluke_skywalker = sw_api.get_person(1)\r\nprint(luke_skywalker)\r\n\r\n# Get information about a film\r\na_new_hope = sw_api.get_film(1)\r\nprint(a_new_hope)\r\n\r\n```\r\n\r\n## Authors\r\n\r\n- [@codewithwan](https://github.com/codewithwan)\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "This Python library interacts with the Star Wars Galaxy API, allowing users to retrieve information about characters, films, and more from the Star Wars universe.",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/codewithwan/starwarsdata"
},
"split_keywords": [
"data",
"starwars"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2ceae3cfdbaea5d1f5b326198f6e7280081d8582b1f624b1e13b66f5a6c64290",
"md5": "81ad5745890f2b35979b60cf86243ddc",
"sha256": "1763408c119c718acd7d7dd6f7acefc63e95053706cbd7ade777845dd4881ca1"
},
"downloads": -1,
"filename": "starwarsdata-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "81ad5745890f2b35979b60cf86243ddc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3413,
"upload_time": "2023-11-19T14:05:25",
"upload_time_iso_8601": "2023-11-19T14:05:25.074084Z",
"url": "https://files.pythonhosted.org/packages/2c/ea/e3cfdbaea5d1f5b326198f6e7280081d8582b1f624b1e13b66f5a6c64290/starwarsdata-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9bfef2ddd64f4d87598d765ef865964d5f2fc466edabcd8605ae5db99b0fc0d4",
"md5": "db610f7729b50bc084cd5782cd425b34",
"sha256": "89ba1fb483b6d93962287e35c80fa66e43376db9c890696bba050da901de5111"
},
"downloads": -1,
"filename": "starwarsdata-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "db610f7729b50bc084cd5782cd425b34",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3133,
"upload_time": "2023-11-19T14:05:26",
"upload_time_iso_8601": "2023-11-19T14:05:26.895135Z",
"url": "https://files.pythonhosted.org/packages/9b/fe/f2ddd64f4d87598d765ef865964d5f2fc466edabcd8605ae5db99b0fc0d4/starwarsdata-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-19 14:05:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "codewithwan",
"github_project": "starwarsdata",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "starwarsdata"
}