CodeforcesApiPy


NameCodeforcesApiPy JSON
Version 2.0.12 PyPI version JSON
download
home_pagehttps://github.com/VadVergasov/CodeforcesApiPy
SummaryImplementation of codeforces.com API
upload_time2024-07-06 08:12:17
maintainerNone
docs_urlNone
authorVadVergasov
requires_python>=3.8
licenseGPLv3
keywords codeforces api python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Codeforces API
[![License](https://img.shields.io/github/license/VadVergasov/CodeforcesApiPy)](https://github.com/VadVergasov/CodeforcesApiPy/blob/master/LICENSE)
[![Stars](https://img.shields.io/github/stars/VadVergasov/CodeforcesApiPy)](https://github.com/VadVergasov/CodeforcesApiPy/stargazers)
[![Forks](https://img.shields.io/github/forks/VadVergasov/CodeforcesApiPy)](https://github.com/VadVergasov/CodeforcesApiPy/network/members)
[![Issues](https://img.shields.io/github/issues/VadVergasov/CodeforcesApiPy)](https://github.com/VadVergasov/CodeforcesApiPy/issues)
[![Publish to PyPI and create Release.](https://github.com/VadVergasov/CodeforcesApiPy/actions/workflows/publish.yml/badge.svg?branch=master)](https://github.com/VadVergasov/CodeforcesApiPy/actions/workflows/publish.yml)
[![Generate wiki](https://github.com/VadVergasov/CodeforcesApiPy/workflows/Generate%20wiki/badge.svg?branch=master)](https://github.com/VadVergasov/CodeforcesApiPy/wiki)
[![Downloads](https://static.pepy.tech/personalized-badge/codeforcesapipy?period=total&units=international_system&left_color=black&right_color=blue&left_text=Total%20downloads)](https://pepy.tech/project/codeforcesapipy)
![Codestyle](https://img.shields.io/badge/code%20style-black-000000.svg)
==========

Installing
----------

With pip:

```bash
pip install CodeforcesApiPy
```

From the repository:

```bash
git clone https://github.com/VadVergasov/CodeforcesApiPy.git
cd codeforcesapipy
python3 setup.py install
```

Using
---------

```python
import codeforces_api

cf_api = codeforces_api.CodeforcesApi(api_key, secret) # Authorized access to api.
anonim_cf_api = codeforces_api.CodeforcesApi() # Unauthorized access to api.

parser = codeforces_api.CodeforcesParser() # Create parser.
```

Types
-------

All types are defined in types.py. They are all completely in line with the [Codeforces API's definition of the types](https://codeforces.com/apiHelp/objects)

Methods
-------

All [API methods](https://codeforces.com/apiHelp/methods) are located in the CodeforcesAPI class. They are renamed to follow common Python naming conventions. E.g. `contest.hacks` is renamed to `contest_hacks` and `user.actions` to `user_actions`.

Transferring to 2 version
--------

In the second version, all objects are represented as a class, so if you want to get a handle of the user you need to do like this: user.handle. You can read about all fields on [Codeforces API objects](https://codeforces.com/apiHelp/objects).

Wiki
--------

Here is link to the [wiki](https://github.com/VadVergasov/CodeforcesApiPy/wiki) for more details.

Examples
---------

Here are some examples of using this library:

* [A2OJ](https://github.com/subodhk01/a2oj) by subodhk01 - allows you to look at your ladder progress.
* [cf_utils](https://github.com/xennygrimmato/cf_utils) by xennygrimmato - allows you to find common solved problems.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/VadVergasov/CodeforcesApiPy",
    "name": "CodeforcesApiPy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "codeforces api python",
    "author": "VadVergasov",
    "author_email": "vadim.vergasov2003@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f2/88/497f9b7dfea4b71cfd4e2adba500c1e7f8f13e85eb2644285a417bbd58f2/codeforcesapipy-2.0.12.tar.gz",
    "platform": "any",
    "description": "Codeforces API\n[![License](https://img.shields.io/github/license/VadVergasov/CodeforcesApiPy)](https://github.com/VadVergasov/CodeforcesApiPy/blob/master/LICENSE)\n[![Stars](https://img.shields.io/github/stars/VadVergasov/CodeforcesApiPy)](https://github.com/VadVergasov/CodeforcesApiPy/stargazers)\n[![Forks](https://img.shields.io/github/forks/VadVergasov/CodeforcesApiPy)](https://github.com/VadVergasov/CodeforcesApiPy/network/members)\n[![Issues](https://img.shields.io/github/issues/VadVergasov/CodeforcesApiPy)](https://github.com/VadVergasov/CodeforcesApiPy/issues)\n[![Publish to PyPI and create Release.](https://github.com/VadVergasov/CodeforcesApiPy/actions/workflows/publish.yml/badge.svg?branch=master)](https://github.com/VadVergasov/CodeforcesApiPy/actions/workflows/publish.yml)\n[![Generate wiki](https://github.com/VadVergasov/CodeforcesApiPy/workflows/Generate%20wiki/badge.svg?branch=master)](https://github.com/VadVergasov/CodeforcesApiPy/wiki)\n[![Downloads](https://static.pepy.tech/personalized-badge/codeforcesapipy?period=total&units=international_system&left_color=black&right_color=blue&left_text=Total%20downloads)](https://pepy.tech/project/codeforcesapipy)\n![Codestyle](https://img.shields.io/badge/code%20style-black-000000.svg)\n==========\n\nInstalling\n----------\n\nWith pip:\n\n```bash\npip install CodeforcesApiPy\n```\n\nFrom the repository:\n\n```bash\ngit clone https://github.com/VadVergasov/CodeforcesApiPy.git\ncd codeforcesapipy\npython3 setup.py install\n```\n\nUsing\n---------\n\n```python\nimport codeforces_api\n\ncf_api = codeforces_api.CodeforcesApi(api_key, secret) # Authorized access to api.\nanonim_cf_api = codeforces_api.CodeforcesApi() # Unauthorized access to api.\n\nparser = codeforces_api.CodeforcesParser() # Create parser.\n```\n\nTypes\n-------\n\nAll types are defined in types.py. They are all completely in line with the [Codeforces API's definition of the types](https://codeforces.com/apiHelp/objects)\n\nMethods\n-------\n\nAll [API methods](https://codeforces.com/apiHelp/methods) are located in the CodeforcesAPI class. They are renamed to follow common Python naming conventions. E.g. `contest.hacks` is renamed to `contest_hacks` and `user.actions` to `user_actions`.\n\nTransferring to 2 version\n--------\n\nIn the second version, all objects are represented as a class, so if you want to get a handle of the user you need to do like this: user.handle. You can read about all fields on [Codeforces API objects](https://codeforces.com/apiHelp/objects).\n\nWiki\n--------\n\nHere is link to the [wiki](https://github.com/VadVergasov/CodeforcesApiPy/wiki) for more details.\n\nExamples\n---------\n\nHere are some examples of using this library:\n\n* [A2OJ](https://github.com/subodhk01/a2oj) by subodhk01 - allows you to look at your ladder progress.\n* [cf_utils](https://github.com/xennygrimmato/cf_utils) by xennygrimmato - allows you to find common solved problems.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Implementation of codeforces.com API",
    "version": "2.0.12",
    "project_urls": {
        "Homepage": "https://github.com/VadVergasov/CodeforcesApiPy"
    },
    "split_keywords": [
        "codeforces",
        "api",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b521a4ac6763681b36495ef6a6ea1473be906803e361dfb00d3f812ce546e0f8",
                "md5": "60044a40da6ae2da855aea65d9434233",
                "sha256": "5f5e0bc67b7b70b8fe211a52b961e1da06ec99f53b2e232f5b1dad84dedc08b7"
            },
            "downloads": -1,
            "filename": "CodeforcesApiPy-2.0.12-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "60044a40da6ae2da855aea65d9434233",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 26600,
            "upload_time": "2024-07-06T08:12:15",
            "upload_time_iso_8601": "2024-07-06T08:12:15.795066Z",
            "url": "https://files.pythonhosted.org/packages/b5/21/a4ac6763681b36495ef6a6ea1473be906803e361dfb00d3f812ce546e0f8/CodeforcesApiPy-2.0.12-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f288497f9b7dfea4b71cfd4e2adba500c1e7f8f13e85eb2644285a417bbd58f2",
                "md5": "16de911980a8e704d319b4fb30bffd28",
                "sha256": "ea3ec52906864b6f4673ddd0b783ec758b69e1b814143455f5e4ab584570c0b9"
            },
            "downloads": -1,
            "filename": "codeforcesapipy-2.0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "16de911980a8e704d319b4fb30bffd28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27549,
            "upload_time": "2024-07-06T08:12:17",
            "upload_time_iso_8601": "2024-07-06T08:12:17.717477Z",
            "url": "https://files.pythonhosted.org/packages/f2/88/497f9b7dfea4b71cfd4e2adba500c1e7f8f13e85eb2644285a417bbd58f2/codeforcesapipy-2.0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-06 08:12:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VadVergasov",
    "github_project": "CodeforcesApiPy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "codeforcesapipy"
}
        
Elapsed time: 4.50779s