Skip to main content

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


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.2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

aioarxiv-0.1.2-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file aioarxiv-0.1.2.tar.gz.

File metadata

  • Download URL: aioarxiv-0.1.2.tar.gz
  • Upload date:
  • Size: 17.8 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

Hashes for aioarxiv-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8184e77bf9ee759a81ebca20c5c0f74c998bd8456a23a080e50d29206cdcadf9
MD5 8a0c16bea7b49c413d491b86be31cdef
BLAKE2b-256 16f98d0ac9f04f3142786f280a3dcf584ce66b14e09237596c88a3a55b9db5b6

See more details on using hashes here.

File details

Details for the file aioarxiv-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: aioarxiv-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 21.8 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

Hashes for aioarxiv-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad1fdb47a630a61d706308a47a1aa9a1546f84173470f5a26ecc6b11312581af
MD5 8920729cc1c1f9283a78c34ff1983879
BLAKE2b-256 be71e0cbc505e31449f00a13ea53af9d121418fb45ade4e3eb980875594eb3c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page