### Install asyncprawcore with pip Source: https://asyncprawcore.readthedocs.io/ Use this command to install asyncprawcore using pip. ```bash pip install asyncprawcore ``` -------------------------------- ### Install asyncprawcore with uv Source: https://asyncprawcore.readthedocs.io/ Use this command to install asyncprawcore using the uv package manager. ```bash uv add asyncprawcore ``` -------------------------------- ### Specify asyncprawcore dependency in setup.py Source: https://asyncprawcore.readthedocs.io/ Example of how to specify the asyncprawcore dependency in a setup.py file, limiting the major version to less than 1. ```python setup(..., install_requires=["asyncprawcore >=0.1, <1"], ...) ``` -------------------------------- ### Execute Python script Source: https://asyncprawcore.readthedocs.io/ Run the saved Python script to execute the asyncprawcore example. ```bash python trophies.py ``` -------------------------------- ### Specify asyncprawcore dependency in requirements.txt Source: https://asyncprawcore.readthedocs.io/ Example of how to specify the asyncprawcore dependency in a requirements.txt file, setting a minimum version and limiting the major version to less than 2. ```text asyncprawcore >=1.5.1, <2 ``` -------------------------------- ### Obtain user trophies using asyncprawcore Source: https://asyncprawcore.readthedocs.io/ This example demonstrates how to use asyncprawcore to fetch a user's trophies. Ensure PRAWCORE_CLIENT_ID and PRAWCORE_CLIENT_SECRET environment variables are set. ```python import os import pprint import asyncio import asyncprawcore async def main(): authenticator = asyncprawcore.TrustedAuthenticator( client_id=os.environ["PRAWCORE_CLIENT_ID"], client_secret=os.environ["PRAWCORE_CLIENT_SECRET"], requestor=asyncprawcore.Requestor(user_agent="YOUR_VALID_USER_AGENT"), ) authorizer = asyncprawcore.ReadOnlyAuthorizer(authenticator=authenticator) await authorizer.refresh() async with asyncprawcore.session(authorizer=authorizer) as session: pprint.pprint( await session.request(method="GET", path="/api/v1/user/bboe/trophies") ) if __name__ == "__main__": asyncio.run(main()) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.