Skip to main content

A library for interacting with Pathfinder 1E character sheet data.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

rerole-lib

This directory contains the library code used throughout the pf-rerole project.

In general, this library is written in a functional style. It is intended that state be managed by library consumers in whatever way they see fit.

Usage

For sample data, peruse the .json files in any of the test directories.

from rerole_lib import character

with open("tests/character/test_data.json") as f:
data = character.load()

print(data["skills"]["climb"])
"""
{'ranks': 2, 'class': True, 'ability': 'strength'}
"""

calculated = character.calculate(data)

print(calculated["skills"]["climb"])
"""
{'ranks': 2, 'class': True, 'ability': 'strength', 'modifier': 11}
"""

Development setup

Create and/or activate virtual environment:

$ python -m venv .venv
$ source .venv/bin/activate

Setup via poetry:

$ poetry install

Testing

Via make:

$ make test

Via poetry:

$ poetry run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rerole_lib-0.2.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rerole_lib-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file rerole_lib-0.2.0.tar.gz.

File metadata

  • Download URL: rerole_lib-0.2.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.9.6-arch1-1

File hashes

Hashes for rerole_lib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7327a8daa4f7b67a0f8c1f107b1070af61761419e4d1fb6404ef35797dd0e1a1
MD5 f5a62dcaaf280982392c3887b4d5344b
BLAKE2b-256 087cf7625c2dcbd4e0794c5f4cb0eaf3467bb343f522c4bb8764f1ec4ad7cade

See more details on using hashes here.

File details

Details for the file rerole_lib-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rerole_lib-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.9.6-arch1-1

File hashes

Hashes for rerole_lib-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ddb7ef4ab9a88423fbeec494ae1918c2602e0fcb111f2204650d4e00a5e2a8a
MD5 1fcfe56f01ec311c234790598b76ee6c
BLAKE2b-256 006449b58f06a9959b23c4859ea9522c05316617e4ea22628db07ab60151da2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page