Skip to main content

fusou-datasets Python SDK

Secure, reproducible data loader for FUSOU research datasets.

Installation

pip install fusou-datasets

Quick Start

import fusou_datasets as fd

# Configure session defaults
fd.configure(
    period_tag="latest",
    table_version="0.6.0",
    cache_dir="./data/cache",
    api_key="your_api_key",
)

# Load battle records (3-tier split: train, validation, test)
df_cells = fd.load("cells", split="train")

# Load equipment synergy data
synergy = fd.load_synergy(period_tag="latest")
print("Single bonuses:", len(synergy.single_bonuses))
print("Cross synergies:", len(synergy.cross_synergies))

# Load ship stat growth curves (naked stats and caps)
growth = fd.load_growth_snapshot(period_tag="latest")

Configuration

Set credentials and defaults globally or via environment variables:

fd.configure(
    api_key="your_key",
    cache_dir="./data/cache",
    period_tag="latest",
    table_version="0.6.0",
)

# Inspect current configuration
print(fd.get_config())

Or via environment variables:

export FUSOU_API_KEY="your_key"
export FUSOU_PERIOD_TAG="latest"
export FUSOU_TABLE_VERSION="0.6.0"
export FUSOU_CACHE_DIR="./data/cache"

3-Tier Data Split

To prevent data leakage and ensure scientific reproducibility, datasets are split deterministically:

  • split="train" (70%): For training models, estimating parameters, and exploratory data analysis.
  • split="validation" (20%): For public verification on fusou-web. Access is audit-logged.
  • split="test" (10%): Held-out test set for blind evaluation. Regular API keys will receive HTTP 403.
train_data = fd.load("cells", split="train")
val_data = fd.load("cells", split="validation")

Caching

When cache_dir is configured, datasets are saved in local Parquet and JSON files:

  • Battle tables: {cache_dir}/{table}/{table_version}/{period_tag}/{split}/data.parquet
  • Master tables: {cache_dir}/master/{table_version}/{period_tag}/{canonical}.parquet
  • Synergy data: {cache_dir}/synergy/{period_tag}/synergy.json
  • Growth curves: {cache_dir}/growth/{table_version}/{period_tag}/bounds.parquet
  • Speed observations: {cache_dir}/soku_speed/{table_version}/{period_tag}/observations.parquet
# Load from cache without contacting the server (raises DatasetNotFoundError if uncached)
df = fd.load("cells", offline=True)
synergy = fd.load_synergy(offline=True)
growth = fd.load_growth_snapshot(offline=True)

# Force re-download from server even if cached
df = fd.load("cells", force_download=True)

Note: When specifying a concrete period_tag (anything other than "latest") in load_speed_observation(...), table_version must also be provided (either as a parameter or via configure(table_version=...)).

Synergy Data

synergy = fd.load_synergy(period_tag="latest")

# Filter single item bonuses by ship ID
ship_bonuses = synergy.query(ship_id=1)

# Export to Parquet for fast analytics
synergy.to_parquet("./data/cache/synergy")

Fluent Query Builder

ds = fd.VerificationDataset("cells", split="validation")

# Filter with Django-style expressions
results = (
    ds.filter(maparea_id=45, mapinfo_no__in=[1, 2])
      .select("maparea_id", "mapinfo_no", "cell_id")
      .limit(500)
      .to_dataframe()
)

API Reference

Function / Class Description
configure(...) Set global API key, URL, cache_dir, period_tag, table_version
get_config() Return dictionary of current configuration
save_api_key(key) Persist API key to ~/.fusou-datasets/settings.json
list_tables() List available dataset tables
list_period_tags() List available period tags
load(table, ...) Load dataset as DataFrame (split: train, validation, test)
load_synergy(...) Load equipment synergy rules and bonuses
load_growth_snapshot(...) Load ship parameter growth curves
load_speed_observation(...) Load speed observation records
load_master(table, ...) Load master-data table
VerificationDataset(...) Fluent dataset interface for hypothesis verification
clear_cache(table=None) Clear local cache

Metadata

Release files for fusou-datasets 0.3.0

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

Source distribution (sdist)

Source distribution for fusou-datasets 0.3.0
File Size Uploaded Provenance Actions
fusou_datasets-0.3.0.tar.gz 43.0 kB With provenance Details for fusou_datasets-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fusou-datasets 0.3.0
File Interpreter ABI Platform Actions
fusou_datasets-0.3.0-py3-none-any.whl Python 3 none any Details for fusou_datasets-0.3.0-py3-none-any.whl

Total release size: 85.6 kB

Release files / fusou_datasets-0.3.0.tar.gz

Download URL fusou_datasets-0.3.0.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
54d6dc7d5ef1594b4666c1eb18d8ef47bbf9ca5830af1798ef8ebc466569d13c
BLAKE2b-256 checksum
How to use checksums
86e52d04bc3ba3085b6faa59b649c056bbe4a431423540220c8f4b115b790b02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / fusou_datasets-0.3.0-py3-none-any.whl

Download URL fusou_datasets-0.3.0-py3-none-any.whl
Size 42.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1df4f24d824fb5c72e1f7b8801fc6e81f60e38ce0fb20d7c1532ada934265b03
BLAKE2b-256 checksum
How to use checksums
516459bc44bbf62e8454fb92e03280f429e2fe8742a1ed6ad8eda35747b74bc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for fusou-datasets 0.3.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fusou_datasets-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

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.

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