asyncprawcore


Nameasyncprawcore JSON
Version 2.4.0 PyPI version JSON
download
home_page
SummaryLow-level asynchronous communication layer for Async PRAW 7+.
upload_time2023-11-27 03:39:53
maintainer
docs_urlNone
author
requires_python~=3.8
license
keywords praw reddit api async asynchronous asyncpraw
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. _main_page:

asyncprawcore
=============

.. image:: https://img.shields.io/pypi/v/asyncprawcore.svg
    :alt: Latest asyncprawcore Version
    :target: https://pypi.python.org/pypi/asyncprawcore

.. image:: https://img.shields.io/pypi/pyversions/asyncprawcore
    :alt: Supported Python Versions
    :target: https://pypi.python.org/pypi/asyncprawcore

.. image:: https://img.shields.io/pypi/dm/asyncprawcore
    :alt: PyPI - Downloads - Monthly
    :target: https://pypi.python.org/pypi/asyncprawcore

.. image:: https://github.com/praw-dev/asyncprawcore/actions/workflows/ci.yml/badge.svg?event=push
    :alt: GitHub Actions Status
    :target: https://github.com/praw-dev/asyncprawcore/actions/workflows/ci.yml

.. image:: https://coveralls.io/repos/github/praw-dev/asyncprawcore/badge.svg
    :alt: Coveralls Coverage
    :target: https://coveralls.io/github/praw-dev/asyncprawcore

.. image:: https://api.securityscorecards.dev/projects/github.com/praw-dev/asyncprawcore/badge
    :alt: OpenSSF Scorecard
    :target: https://api.securityscorecards.dev/projects/github.com/praw-dev/asyncprawcore

.. image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
    :alt: Contributor Covenant
    :target: https://github.com/praw-dev/.github/blob/main/CODE_OF_CONDUCT.md

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
    :alt: pre-commit
    :target: https://github.com/pre-commit/pre-commit

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :alt: Black code style
    :target: https://github.com/psf/black

asyncprawcore is a low-level communication layer used by Async PRAW 7+.

Installation
------------

Install asyncprawcore using ``pip`` via:

.. code-block:: console

    pip install asyncprawcore

Execution Example
-----------------

The following example demonstrates how to use asyncprawcore to obtain the list of
trophies for a given user using the script-app type. This example assumes you have the
environment variables ``PRAWCORE_CLIENT_ID`` and ``PRAWCORE_CLIENT_SECRET`` set to the
appropriate values for your application.

.. code-block:: python

    import os
    import pprint
    import asyncio
    import asyncprawcore


    async def main():
        authenticator = asyncprawcore.TrustedAuthenticator(
            asyncprawcore.Requestor("YOUR_VALID_USER_AGENT"),
            os.environ["PRAWCORE_CLIENT_ID"],
            os.environ["PRAWCORE_CLIENT_SECRET"],
        )
        authorizer = asyncprawcore.ReadOnlyAuthorizer(authenticator)
        await authorizer.refresh()

        async with asyncprawcore.session(authorizer) as session:
            pprint.pprint(await session.request("GET", "/api/v1/user/bboe/trophies"))


    if __name__ == "__main__":
        asyncio.run(main())

Save the above as ``trophies.py`` and then execute via:

.. code-block:: console

    python trophies.py

Additional examples can be found at:
https://github.com/praw-dev/asyncprawcore/tree/main/examples

Depending on asyncprawcore
--------------------------

asyncprawcore follows `semantic versioning <https://semver.org/>`_ with the exception
that deprecations will not be preceded by a minor release. In essence, expect only major
versions to introduce breaking changes to asyncprawcore's public interface. As a result,
if you depend on asyncprawcore then it is a good idea to specify not only the minimum
version of asyncprawcore your package requires, but to also limit the major version.

Below are two examples of how you may want to specify your asyncprawcore dependency:

setup.py
~~~~~~~~

.. code-block:: python

    setup(..., install_requires=["asyncprawcore >=0.1, <1"], ...)

requirements.txt
~~~~~~~~~~~~~~~~

.. code-block:: text

    asyncprawcore >=1.5.1, <2


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "asyncprawcore",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": "Joel Payne <lilspazjoekp@gmail.com>",
    "keywords": "praw,reddit,api,async,asynchronous,asyncpraw",
    "author": "",
    "author_email": "Joel Payne <lilspazjoekp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1e/0a/45dfc8c3b91d74f646817db3e89baecbd963a8374e2a8a33f2eb83c7e398/asyncprawcore-2.4.0.tar.gz",
    "platform": null,
    "description": ".. _main_page:\n\nasyncprawcore\n=============\n\n.. image:: https://img.shields.io/pypi/v/asyncprawcore.svg\n    :alt: Latest asyncprawcore Version\n    :target: https://pypi.python.org/pypi/asyncprawcore\n\n.. image:: https://img.shields.io/pypi/pyversions/asyncprawcore\n    :alt: Supported Python Versions\n    :target: https://pypi.python.org/pypi/asyncprawcore\n\n.. image:: https://img.shields.io/pypi/dm/asyncprawcore\n    :alt: PyPI - Downloads - Monthly\n    :target: https://pypi.python.org/pypi/asyncprawcore\n\n.. image:: https://github.com/praw-dev/asyncprawcore/actions/workflows/ci.yml/badge.svg?event=push\n    :alt: GitHub Actions Status\n    :target: https://github.com/praw-dev/asyncprawcore/actions/workflows/ci.yml\n\n.. image:: https://coveralls.io/repos/github/praw-dev/asyncprawcore/badge.svg\n    :alt: Coveralls Coverage\n    :target: https://coveralls.io/github/praw-dev/asyncprawcore\n\n.. image:: https://api.securityscorecards.dev/projects/github.com/praw-dev/asyncprawcore/badge\n    :alt: OpenSSF Scorecard\n    :target: https://api.securityscorecards.dev/projects/github.com/praw-dev/asyncprawcore\n\n.. image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg\n    :alt: Contributor Covenant\n    :target: https://github.com/praw-dev/.github/blob/main/CODE_OF_CONDUCT.md\n\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white\n    :alt: pre-commit\n    :target: https://github.com/pre-commit/pre-commit\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :alt: Black code style\n    :target: https://github.com/psf/black\n\nasyncprawcore is a low-level communication layer used by Async PRAW 7+.\n\nInstallation\n------------\n\nInstall asyncprawcore using ``pip`` via:\n\n.. code-block:: console\n\n    pip install asyncprawcore\n\nExecution Example\n-----------------\n\nThe following example demonstrates how to use asyncprawcore to obtain the list of\ntrophies for a given user using the script-app type. This example assumes you have the\nenvironment variables ``PRAWCORE_CLIENT_ID`` and ``PRAWCORE_CLIENT_SECRET`` set to the\nappropriate values for your application.\n\n.. code-block:: python\n\n    import os\n    import pprint\n    import asyncio\n    import asyncprawcore\n\n\n    async def main():\n        authenticator = asyncprawcore.TrustedAuthenticator(\n            asyncprawcore.Requestor(\"YOUR_VALID_USER_AGENT\"),\n            os.environ[\"PRAWCORE_CLIENT_ID\"],\n            os.environ[\"PRAWCORE_CLIENT_SECRET\"],\n        )\n        authorizer = asyncprawcore.ReadOnlyAuthorizer(authenticator)\n        await authorizer.refresh()\n\n        async with asyncprawcore.session(authorizer) as session:\n            pprint.pprint(await session.request(\"GET\", \"/api/v1/user/bboe/trophies\"))\n\n\n    if __name__ == \"__main__\":\n        asyncio.run(main())\n\nSave the above as ``trophies.py`` and then execute via:\n\n.. code-block:: console\n\n    python trophies.py\n\nAdditional examples can be found at:\nhttps://github.com/praw-dev/asyncprawcore/tree/main/examples\n\nDepending on asyncprawcore\n--------------------------\n\nasyncprawcore follows `semantic versioning <https://semver.org/>`_ with the exception\nthat deprecations will not be preceded by a minor release. In essence, expect only major\nversions to introduce breaking changes to asyncprawcore's public interface. As a result,\nif you depend on asyncprawcore then it is a good idea to specify not only the minimum\nversion of asyncprawcore your package requires, but to also limit the major version.\n\nBelow are two examples of how you may want to specify your asyncprawcore dependency:\n\nsetup.py\n~~~~~~~~\n\n.. code-block:: python\n\n    setup(..., install_requires=[\"asyncprawcore >=0.1, <1\"], ...)\n\nrequirements.txt\n~~~~~~~~~~~~~~~~\n\n.. code-block:: text\n\n    asyncprawcore >=1.5.1, <2\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Low-level asynchronous communication layer for Async PRAW 7+.",
    "version": "2.4.0",
    "project_urls": {
        "Issue Tracker": "https://github.com/praw-dev/asyncprawcore/issues",
        "Source Code": "https://github.com/praw-dev/asyncprawcore"
    },
    "split_keywords": [
        "praw",
        "reddit",
        "api",
        "async",
        "asynchronous",
        "asyncpraw"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1da0a1f216c7ad7fd94482242eb92d6903c0ed5f3340436b952db2a42d2eddeb",
                "md5": "9bcde13c8b3bdf2fe787ca9cc5a0771e",
                "sha256": "3fe0f85d783ad0fd2a5d68d219b576bdbe04260ad7195c8a035d8724f57cfa45"
            },
            "downloads": -1,
            "filename": "asyncprawcore-2.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9bcde13c8b3bdf2fe787ca9cc5a0771e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 19741,
            "upload_time": "2023-11-27T03:39:51",
            "upload_time_iso_8601": "2023-11-27T03:39:51.793805Z",
            "url": "https://files.pythonhosted.org/packages/1d/a0/a1f216c7ad7fd94482242eb92d6903c0ed5f3340436b952db2a42d2eddeb/asyncprawcore-2.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e0a45dfc8c3b91d74f646817db3e89baecbd963a8374e2a8a33f2eb83c7e398",
                "md5": "ae21572fce05f3d494971064c8d265f0",
                "sha256": "3a3359e5cd1ebe61d544a09d4b5eca7b16edfd17de07081a8415fc794f7bb62e"
            },
            "downloads": -1,
            "filename": "asyncprawcore-2.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ae21572fce05f3d494971064c8d265f0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 18072,
            "upload_time": "2023-11-27T03:39:53",
            "upload_time_iso_8601": "2023-11-27T03:39:53.009442Z",
            "url": "https://files.pythonhosted.org/packages/1e/0a/45dfc8c3b91d74f646817db3e89baecbd963a8374e2a8a33f2eb83c7e398/asyncprawcore-2.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-27 03:39:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "praw-dev",
    "github_project": "asyncprawcore",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "asyncprawcore"
}
        
Elapsed time: 0.14918s