debaterpy


Namedebaterpy JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryA simple library to keep track of your progress and history in competitive debating.
upload_time2023-01-16 15:14:06
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords debating debate analysis statistics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            debater.py
==========
.. image:: https://badge.fury.io/py/debaterpy.svg?
    :target: https://pypi.org/project/debaterpy/

.. image:: https://badgen.net/github/license/daankoning/debater.py?
    :target: https://github.com/daankoning/debater.py/blob/main/LICENSE
    
.. image:: https://readthedocs.org/projects/debaterpy/badge/?version=stable
    :target: https://debaterpy.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status


A simple library to keep track of your progress and history in competitive debating.

The library is largely meant to interface with `DebaterJSON <https://github.com/daankoning/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 <https://debaterpy.readthedocs.io>`_.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "debaterpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "debating,debate,analysis,statistics",
    "author": "",
    "author_email": "Daan Olivier Koning <daanolivierkoning@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/95/d2/7b92c1eb22dfafde7b309e90101a2ebb0c47a87f16c9ae23c4b0b14690d2/debaterpy-0.1.1.tar.gz",
    "platform": null,
    "description": "debater.py\n==========\n.. image:: https://badge.fury.io/py/debaterpy.svg?\n    :target: https://pypi.org/project/debaterpy/\n\n.. image:: https://badgen.net/github/license/daankoning/debater.py?\n    :target: https://github.com/daankoning/debater.py/blob/main/LICENSE\n    \n.. image:: https://readthedocs.org/projects/debaterpy/badge/?version=stable\n    :target: https://debaterpy.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n\nA simple library to keep track of your progress and history in competitive debating.\n\nThe library is largely meant to interface with `DebaterJSON <https://github.com/daankoning/DebaterJSON>`_ and as such\nprovides a significant number of functions and classes to analyse and manipulate these records.\n\nInstallation\n************\nBecause the package is available on PyPi simply run the following command to install it: ::\n\n    pip install debaterpy\n\nUsage\n*****\nInstantiating objects is really simple, assuming you have a valid DebaterJSON string loaded in ``data`` it only takes two\nlines of code to generate an object from them.\n\n>>> import debaterpy\n>>> record = debaterpy.Record.from_json(data)\n\nIn fact, this method should cover the vast majority of use cases for generating records. In case more control over\nrecord creation (e.g. for generating test data or fetching a record from an external source) most classes are standard\npython dataclasses and as such offer fine programmatic control.\n\nHaving a ``Record`` object in memory it is incredibly simple to do even relatively complex manipulations. For example,\nin order to get a speaker's average speaks in rounds where their team won, do:\n\n>>> winning_speeches = debaterpy.get_all_speeches(\n    record,\n    lambda tournament, round, speech: tournament.format == \"BP\" and round.result == 3\n)\n>>> winning_speaks = [speech.speak for speech in winning_speeches]\n>>> sum(winning_speaks)/len(winning_speaks)\n78.88888888888889\n\nDocumentation\n*************\nThe documentation lives in the ``docs`` directory as well as on `ReadTheDocs <https://debaterpy.readthedocs.io>`_.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A simple library to keep track of your progress and history in competitive debating.",
    "version": "0.1.1",
    "split_keywords": [
        "debating",
        "debate",
        "analysis",
        "statistics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e0d87b99334915bb84902c46eedc9a1b1fdd7c9094f39628f17fd0e53b6ab64",
                "md5": "f95e27bc423655e1e540eb800c41b1e6",
                "sha256": "9415db64b811c764d94a3fbd45f00d22429f28e78d90830aa7ad961a4bbb4c0e"
            },
            "downloads": -1,
            "filename": "debaterpy-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f95e27bc423655e1e540eb800c41b1e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7118,
            "upload_time": "2023-01-16T15:14:04",
            "upload_time_iso_8601": "2023-01-16T15:14:04.695329Z",
            "url": "https://files.pythonhosted.org/packages/3e/0d/87b99334915bb84902c46eedc9a1b1fdd7c9094f39628f17fd0e53b6ab64/debaterpy-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "95d27b92c1eb22dfafde7b309e90101a2ebb0c47a87f16c9ae23c4b0b14690d2",
                "md5": "3a1bd4f623d893b20697b5c7397c9caf",
                "sha256": "7dc24e600ccf6df8763e79fc14d5252f1db7533b346295d6200ebe4dd5fd614d"
            },
            "downloads": -1,
            "filename": "debaterpy-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3a1bd4f623d893b20697b5c7397c9caf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6649,
            "upload_time": "2023-01-16T15:14:06",
            "upload_time_iso_8601": "2023-01-16T15:14:06.209122Z",
            "url": "https://files.pythonhosted.org/packages/95/d2/7b92c1eb22dfafde7b309e90101a2ebb0c47a87f16c9ae23c4b0b14690d2/debaterpy-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-16 15:14:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "debaterpy"
}
        
Elapsed time: 0.06468s