Skip to content

Releases: halfstackpgr/py-codeforces

1.3

17 Apr 20:46
Compare
Choose a tag to compare

Full Changelog: v1.0...1.3

py-codeforces

09 Apr 05:06
Compare
Choose a tag to compare

image

Py-Codeforces

Py-Codeforces is a high-performance and type-safe Python library designed for seamless interaction with Codeforces. It offers both asynchronous and synchronous client handlers, allowing developers to choose the appropriate method based on their requirements.

Key Features:

  1. Client Handlers:

    • Synchronous Handler: SyncMethod
    • Asynchronous Handler: AsyncMethod
  2. Functionality:

    Both client handlers offer the same set of functionalities, ensuring consistency and flexibility in usage.

  3. Authentication:

    To access user-related attributes, authentication must be enabled by setting the enable_auth parameter to True.

  4. API Documentation:

    This library is built entirely based on the official Codeforces API Documentation, ensuring reliability and adherence to best practices.

Example Usage:

Asynchronous usage:

import asyncio
import pycodeforces

async def main():
    api = pycodeforces.AsyncMethod()
    users = await api.get_user_info(handles="DmitriyH;Fefer_Ivan")
    # use `;` to add multiple parameters.
    async for user in users:
        print(user.avatar)

asyncio.run(main())

Synchronous usage:

import pycodeforces

async def main():
    get = pycodeforces.SyncMethod()
    users = get.get_user_info(handles="DmitriyH;Fefer_Ivan")
    # use `;` to add multiple parameters.
    for user in users:
        print(user.avatar)

Changes:
Added the abcs for people with strict type hinting issues.

Full Changelog: v1.0dev...v1.1dev

py-codeforces

09 Apr 04:48
Compare
Choose a tag to compare

image

Py-Codeforces

Py-Codeforces is a high-performance and type-safe Python library designed for seamless interaction with Codeforces. It offers both asynchronous and synchronous client handlers, allowing developers to choose the appropriate method based on their requirements.

Key Features:

  1. Client Handlers:

    • Synchronous Handler: SyncMethod
    • Asynchronous Handler: AsyncMethod
  2. Functionality:

    Both client handlers offer the same set of functionalities, ensuring consistency and flexibility in usage.

  3. Authentication:

    To access user-related attributes, authentication must be enabled by setting the enable_auth parameter to True.

  4. API Documentation:

    This library is built entirely based on the official Codeforces API Documentation, ensuring reliability and adherence to best practices.

Example Usage:

Asynchronous usage:

import asyncio
import pycodeforces

async def main():
    api = pycodeforces.AsyncMethod()
    users = await api.get_user_info(handles="DmitriyH;Fefer_Ivan")
    # use `;` to add multiple parameters.
    async for user in users:
        print(user.avatar)

asyncio.run(main())

Synchronous usage:

import pycodeforces

async def main():
    get = pycodeforces.SyncMethod()
    users = get.get_user_info(handles="DmitriyH;Fefer_Ivan")
    # use `;` to add multiple parameters.
    for user in users:
        print(user.avatar)