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 Sheet

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

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

data.calculate()

print(data["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.7.1.tar.gz (7.2 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.7.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rerole_lib-0.7.1.tar.gz
Algorithm Hash digest
SHA256 0a54bb8b5e19673d76bee91ee69f13ae707eabd22b29823f616453f3196a0fdb
MD5 388e1fb8a9f3a3fc6cd9bd044e220aef
BLAKE2b-256 36a64e2e9a1408fae668c428543d5f0536f6cc6720ba3c798dc31f1617403282

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rerole_lib-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99c5f1e43a6a64445ab3bcf8cf43c1523610992b14dd7e70a4277c943e62a6af
MD5 2eb0489d12e4a934ebb6a749ec3f689a
BLAKE2b-256 ac74d1c21f2f44ed8156202e1418411c868a6a77155127ce4cfb0d2f3d7f60d1

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