Skip to main content

FIO Wrapper - Prosperous Universe game data through FIO

PyPI - Version PyPI - Python Version License: MIT PyPI - Downloads

Codacy Badge Codacy Badge


FIO API wrapper with 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, the Prosperous Universe Empire and Base Planning Tool.

Usage

Installation

pip install fio-wrapper

Access data

Creating the FIO adapter and looking for information about the material Drinking Water by its ticker "DW".

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.

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)
{
    "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:

pytest 

Generate coverage report:

pytest --cov --cov-report=html:coverage --cov-config=.coveragerc

Documentation

mkdocs serve 

Metadata

Release files for fio-wrapper 1.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fio-wrapper 1.3.6
File Size Uploaded
fio_wrapper-1.3.6.tar.gz 21.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fio-wrapper 1.3.6
File Interpreter ABI Platform
fio_wrapper-1.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 55.4 kB

Release files / fio_wrapper-1.3.6.tar.gz

Download URL fio_wrapper-1.3.6.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
55e4c773d049756759fd2601337ed7fec8b4cb641380fad1c4cbebfd0df3d3d8
BLAKE2b-256 checksum
How to use checksums
0da554a8311760d3855892b68095935fce03a19a78599e974ba81b542e26d257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.13.3 Linux/6.8.0-1021-azure

Release files / fio_wrapper-1.3.6-py3-none-any.whl

Download URL fio_wrapper-1.3.6-py3-none-any.whl
Size 34.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a85c19e55a84619243cef78590d1fcd9f8b181cfbdd0a236c3d05cf0d13cceed
BLAKE2b-256 checksum
How to use checksums
91683345bfd5ab7cec29e8d8b3300b4b7fd65a282397302aabfb665f38bccc11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.13.3 Linux/6.8.0-1021-azure

Release history Release notifications | RSS feed

This release

1.3.6 This release

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page