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.

import json

from rerole_lib import character

with open("tests/character/test_data.json") as f:
    data = json.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.4.0.tar.gz (6.3 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.4.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rerole_lib-0.4.0.tar.gz
Algorithm Hash digest
SHA256 68db454ba2ac5ee978b1a9b3d05bb3531f886fc787486f11aff48cf4162ca241
MD5 d0eeffaa7715a65111207723b6c90e2b
BLAKE2b-256 97281e1e0b3c7025718e98ada7bcda82ec9003d470c1fd6d7c81bbb4622edd59

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rerole_lib-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a84b33c3f4c31f2db9f437593566ce66e5e7ef6dc4b013df131c584a5d254a22
MD5 fbe60ba6e69263d133d72e3a452439ff
BLAKE2b-256 d6f46ba0a4fda83e0bb5d416d7e427eb0f0848326c7890e1b2ea586d0799bd33

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