An async Python client for the arXiv API with enhanced performance and flexible configuration options.
Warning
This project is currently under development and has not yet reached a stable release. We do not recommend using it in production environments.
- Asynchronous API calls for better performance
- Customized configuration client
- Flexible search and download capabilities
- Rate limiting and concurrency control aligned with the arXiv API terms of use
- Complete type hints (PEP 561) and documentation
pip install aioarxivOr with uv:
uv add aioarxivimport asyncio
from aioarxiv import ArxivClient
async def main() -> None:
async with ArxivClient() as client:
result = await client.search("all:electron", max_results=10)
print(f"Total results: {result.total_result}")
for paper in result.papers:
print(paper.info.title)
asyncio.run(main())You can configure the client by passing an instance of ArxivConfig to the ArxivClient constructor.
Configuration in a dotenv file is also an option; values are loaded automatically from environment
variables with the ARXIV_ prefix.
from aioarxiv import ArxivClient, ArxivConfig
config = ArxivConfig(
proxy="http://127.0.0.1:10808",
log_level="DEBUG",
page_size=10,
)
client = ArxivClient(config=config)- Python 3.10 or higher