arxiv Parse library
Project description
Aioarxiv
An async Python client for the arXiv API with enhanced performance and flexible configuration options.
⚠️ Warning: This project is currently in beta. Not recommended for production use.
Features
- Asynchronous API calls for better performance
- Flexible search and download capabilities
- Customizable rate limiting and concurrent requests
- Simple error handling
Installation
pip install aioarxiv
Quick Start
import asyncio
from aioarxiv import ArxivClient
async def main():
async with ArxivClient() as client:
async for paper in client.search("quantum computing", max_results=1):
print(f"Title: {paper.title}")
print(f"Authors: {', '.join(a.name for a in paper.authors)}")
print(f"Summary: {paper.summary[:200]}...")
# Download PDF
file_path = await client.download_paper(paper)
print(f"Downloaded to: {file_path}")
if __name__ == "__main__":
asyncio.run(main())
Configuration
from aioarxiv import ArxivConfig, ArxivClient
config = ArxivConfig(
rate_limit_calls=3, # Rate limit per window
rate_limit_period=1.0, # Window period in seconds
max_concurrent_requests=3 # Max concurrent requests
)
client = ArxivClient(config=config)
Error Handling
try:
async for paper in client.search("quantum computing"):
print(paper.title)
except SearchCompleteException:
print("Search complete")
Requirements
- Python 3.9 or higher
License
MIT License (c) 2024 BalconyJH
Links
- Documentation for aioarxiv is WIP
- ArXiv API
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioarxiv-0.1.1.tar.gz
(18.4 kB
view details)
Built Distribution
aioarxiv-0.1.1-py3-none-any.whl
(24.5 kB
view details)
File details
Details for the file aioarxiv-0.1.1.tar.gz
.
File metadata
- Download URL: aioarxiv-0.1.1.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a9162b0d29677b9fc51a2d26db64395da178305d2e9b599c847271f35e013bd |
|
MD5 | 9337968e8edaef6fd94c7310d5025711 |
|
BLAKE2b-256 | 7a30c03450347dcf10b11377a964088414b1b53012b37ffa90dab5cbfc80e7c2 |
File details
Details for the file aioarxiv-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: aioarxiv-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.1 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6638898f418e9ee755cb27b7c096cb2ef161c94a718b08a8e0b9619f0e34e3af |
|
MD5 | fd064710a1f7065176cb6bbefe2bdaff |
|
BLAKE2b-256 | 4953c35bca3e9f923d8a83ccff9158862f18555bca6df14a6bd0c9d54a8f7e90 |