Name | fio-wrapper JSON |
Version |
1.3.4
JSON |
| download |
home_page | |
Summary | Python API wrapper for Prosperous Universes community API FIO. |
upload_time | 2024-03-04 07:21:55 |
maintainer | |
docs_url | None |
author | Jan |
requires_python | >=3.8,<4.0 |
license | MIT |
keywords |
fio
prosperous universe
api
wrapper
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# *FIO Wrapper* - Prosperous Universe game data through FIO
[![PyPI - Version](https://img.shields.io/pypi/v/fio-wrapper.svg)](https://pypi.org/project/fio-wrapper)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fio-wrapper.svg)](https://pypi.org/project/fio-wrapper)
[![License: MIT](https://img.shields.io/badge/license-MIT-C06524)](https://github.com/jplacht/fio_wrapper/blob/master/LICENSE.md)
![PyPI - Downloads](https://img.shields.io/pypi/dm/fio-wrapper)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5bdfeae4188143c7abeb3316aa1acce0)](https://app.codacy.com/gh/jplacht/fio_wrapper/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/5bdfeae4188143c7abeb3316aa1acce0)](https://app.codacy.com/gh/jplacht/fio_wrapper/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
---
[FIO](https://doc.fnar.net/) API wrapper with [pydantic](https://github.com/pydantic/pydantic) data validation and easy-to-use querying. **FIO Wrapper** implements the most used endpoints of Prosperous Universes community game data API.
FIO Wrapper was developed as part of [PRUNplanner](https://prunplanner.org/), the Prosperous Universe Empire and Base Planning Tool.
- Source Code: [https://github.com/prunplanner/fio_wrapper](https://github.com/prunplanner/fio_wrapper)
- Documentation: [https://prunplanner.github.io/fio_wrapper/](https://prunplanner.github.io/fio_wrapper/)
- PyPi Package: [https://pypi.org/project/fio-wrapper/](https://pypi.org/project/fio-wrapper/)
# Usage
## Installation
```python
pip install fio-wrapper
```
## Access data
Creating the FIO adapter and looking for information about the material Drinking Water by its ticker "DW".
```python
from fio_wrapper import FIO
fio = FIO()
material = fio.Material.get("DW")
print(material)
print(material.model_dump_json())
```
This will print the material information of Drinking Water as MaterialModel and it's JSON.
```python
MaterialId='4fca6f5b5e6c3b8a1b887c6dc99db146' CategoryName='consumables (basic)' CategoryId='3f047ec3043bdd795fd7272d6be98799' Name='drinkingWater' Ticker='DW' Weight=0.10000000149011612 Volume=0.10000000149011612 UserNameSubmitted='SAGANAKI' Timestamp=datetime.datetime(2023, 10, 28, 19, 26, 21, 831707)
```
```json
{
"MaterialId": "4fca6f5b5e6c3b8a1b887c6dc99db146",
"CategoryName": "consumables (basic)",
"CategoryId": "3f047ec3043bdd795fd7272d6be98799",
"Name": "drinkingWater",
"Ticker": "DW",
"Weight": 0.10000000149011612,
"Volume": 0.10000000149011612,
"UserNameSubmitted": "SAGANAKI",
"Timestamp": "2023-10-28T19:26:21.831707"
}
```
# Contributing
We welcome contributions of all types! In order to set up **fio_wrapper** locally please do the following:
1. Install Python + Poetry
2. Run the poetry environment and install depenencies
3. We are aiming for 100% code coverage
# Tests
**fio_wrapper** uses `pytest`, `requests_mock` and `pytest-cov` to run tests, mock calls towards FIO endpoints and generate the code coverage report and use `black` as formatter.
Run tests:
```shell
pytest
```
Generate coverage report:
```shell
pytest --cov --cov-report=html:coverage --cov-config=.coveragerc
```
# Documentation
```shell
mkdocs serve
```
Raw data
{
"_id": null,
"home_page": "",
"name": "fio-wrapper",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "fio,prosperous universe,api,wrapper",
"author": "Jan",
"author_email": "jplacht+pyfio@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/62/e5/63e9677d2ebf7c1859c4462ae553b34e1b9c61881eeb622081a353798d24/fio_wrapper-1.3.4.tar.gz",
"platform": null,
"description": "# *FIO Wrapper* - Prosperous Universe game data through FIO\n\n[![PyPI - Version](https://img.shields.io/pypi/v/fio-wrapper.svg)](https://pypi.org/project/fio-wrapper)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fio-wrapper.svg)](https://pypi.org/project/fio-wrapper)\n[![License: MIT](https://img.shields.io/badge/license-MIT-C06524)](https://github.com/jplacht/fio_wrapper/blob/master/LICENSE.md)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/fio-wrapper)\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5bdfeae4188143c7abeb3316aa1acce0)](https://app.codacy.com/gh/jplacht/fio_wrapper/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)\n[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/5bdfeae4188143c7abeb3316aa1acce0)](https://app.codacy.com/gh/jplacht/fio_wrapper/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)\n\n---\n\n[FIO](https://doc.fnar.net/) API wrapper with [pydantic](https://github.com/pydantic/pydantic) data validation and easy-to-use querying. **FIO Wrapper** implements the most used endpoints of Prosperous Universes community game data API.\n\nFIO Wrapper was developed as part of [PRUNplanner](https://prunplanner.org/), the Prosperous Universe Empire and Base Planning Tool.\n\n- Source Code: [https://github.com/prunplanner/fio_wrapper](https://github.com/prunplanner/fio_wrapper)\n- Documentation: [https://prunplanner.github.io/fio_wrapper/](https://prunplanner.github.io/fio_wrapper/)\n- PyPi Package: [https://pypi.org/project/fio-wrapper/](https://pypi.org/project/fio-wrapper/)\n\n# Usage\n## Installation\n```python\npip install fio-wrapper\n```\n\n## Access data\nCreating the FIO adapter and looking for information about the material Drinking Water by its ticker \"DW\".\n```python\nfrom fio_wrapper import FIO\n\nfio = FIO()\n\nmaterial = fio.Material.get(\"DW\")\nprint(material)\nprint(material.model_dump_json())\n```\n\nThis will print the material information of Drinking Water as MaterialModel and it's JSON.\n```python\nMaterialId='4fca6f5b5e6c3b8a1b887c6dc99db146' CategoryName='consumables (basic)' CategoryId='3f047ec3043bdd795fd7272d6be98799' Name='drinkingWater' Ticker='DW' Weight=0.10000000149011612 Volume=0.10000000149011612 UserNameSubmitted='SAGANAKI' Timestamp=datetime.datetime(2023, 10, 28, 19, 26, 21, 831707)\n```\n\n```json\n{\n \"MaterialId\": \"4fca6f5b5e6c3b8a1b887c6dc99db146\",\n \"CategoryName\": \"consumables (basic)\",\n \"CategoryId\": \"3f047ec3043bdd795fd7272d6be98799\",\n \"Name\": \"drinkingWater\",\n \"Ticker\": \"DW\",\n \"Weight\": 0.10000000149011612,\n \"Volume\": 0.10000000149011612,\n \"UserNameSubmitted\": \"SAGANAKI\",\n \"Timestamp\": \"2023-10-28T19:26:21.831707\"\n}\n```\n\n# Contributing\n\nWe welcome contributions of all types! In order to set up **fio_wrapper** locally please do the following:\n\n1. Install Python + Poetry\n2. Run the poetry environment and install depenencies\n3. We are aiming for 100% code coverage\n\n# Tests\n\n**fio_wrapper** uses `pytest`, `requests_mock` and `pytest-cov` to run tests, mock calls towards FIO endpoints and generate the code coverage report and use `black` as formatter.\n\nRun tests:\n```shell\npytest \n```\n\nGenerate coverage report:\n```shell\npytest --cov --cov-report=html:coverage --cov-config=.coveragerc\n```\n\n# Documentation\n\n```shell\nmkdocs serve \n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python API wrapper for Prosperous Universes community API FIO.",
"version": "1.3.4",
"project_urls": {
"Documentation": "https://prunplanner.github.io/fio_wrapper/",
"Homepage": "https://prunplanner.github.io/fio_wrapper/",
"Source": "https://github.com/prunplanner/fio_wrapper"
},
"split_keywords": [
"fio",
"prosperous universe",
"api",
"wrapper"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "434f3ef8a21dc413aec36555b0389ca3c292cc9581e97d622562f6cfa278fec0",
"md5": "054468d8a6c491dbc55cad12932f723c",
"sha256": "fcb5b1bafbfe9cde4d8c7050edcdc770b914dc2af499eb1fbaf63da47a76347d"
},
"downloads": -1,
"filename": "fio_wrapper-1.3.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "054468d8a6c491dbc55cad12932f723c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 37357,
"upload_time": "2024-03-04T07:21:53",
"upload_time_iso_8601": "2024-03-04T07:21:53.809295Z",
"url": "https://files.pythonhosted.org/packages/43/4f/3ef8a21dc413aec36555b0389ca3c292cc9581e97d622562f6cfa278fec0/fio_wrapper-1.3.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "62e563e9677d2ebf7c1859c4462ae553b34e1b9c61881eeb622081a353798d24",
"md5": "84a212510e02253fdf5711f83c56d690",
"sha256": "92810c441b29952112c08a878dd1f475a427a005d7457d34ff941e2ffa15032a"
},
"downloads": -1,
"filename": "fio_wrapper-1.3.4.tar.gz",
"has_sig": false,
"md5_digest": "84a212510e02253fdf5711f83c56d690",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 22081,
"upload_time": "2024-03-04T07:21:55",
"upload_time_iso_8601": "2024-03-04T07:21:55.035877Z",
"url": "https://files.pythonhosted.org/packages/62/e5/63e9677d2ebf7c1859c4462ae553b34e1b9c61881eeb622081a353798d24/fio_wrapper-1.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-04 07:21:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "prunplanner",
"github_project": "fio_wrapper",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"lcname": "fio-wrapper"
}