debater.py
A simple library to keep track of your progress and history in competitive debating.
The library is largely meant to interface with DebaterJSON and as such provides a significant number of functions and classes to analyse and manipulate these records.
Installation
Because the package is available on PyPi simply run the following command to install it:
pip install debaterpy
Usage
Instantiating objects is really simple, assuming you have a valid DebaterJSON string loaded in data it only takes two lines of code to generate an object from them.
>>> import debaterpy >>> record = debaterpy.Record.from_json(data)
In fact, this method should cover the vast majority of use cases for generating records. In case more control over record creation (e.g. for generating test data or fetching a record from an external source) most classes are standard python dataclasses and as such offer fine programmatic control.
Having a Record object in memory it is incredibly simple to do even relatively complex manipulations. For example, in order to get a speaker’s average speaks in rounds where their team won, do:
>>> winning_speeches = debaterpy.get_all_speeches(
record,
lambda tournament, round, speech: tournament.format == "BP" and round.result == 3
)
>>> winning_speaks = [speech.speak for speech in winning_speeches]
>>> sum(winning_speaks)/len(winning_speaks)
78.88888888888889
Documentation
The documentation lives in the docs directory as well as on ReadTheDocs.
Metadata
Release files for debaterpy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| debaterpy-0.1.1.tar.gz | 6.6 kB | Without provenance | Details for debaterpy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| debaterpy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for debaterpy-0.1.1-py3-none-any.whl |
Total release size: 13.8 kB
Release files / debaterpy-0.1.1.tar.gz
| Download URL | debaterpy-0.1.1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7dc24e600ccf6df8763e79fc14d5252f1db7533b346295d6200ebe4dd5fd614d
|
|
BLAKE2b-256 checksum How to use checksums |
95d27b92c1eb22dfafde7b309e90101a2ebb0c47a87f16c9ae23c4b0b14690d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / debaterpy-0.1.1-py3-none-any.whl
| Download URL | debaterpy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9415db64b811c764d94a3fbd45f00d22429f28e78d90830aa7ad961a4bbb4c0e
|
|
BLAKE2b-256 checksum How to use checksums |
3e0d87b99334915bb84902c46eedc9a1b1fdd7c9094f39628f17fd0e53b6ab64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for debaterpy 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.