Metadata-Version: 2.4
Name: Async-Sharepoint
Version: 0.1.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Typing :: Typed
License-File: LICENSE
Summary: Async SharePoint client powered by Rust
Home-Page: https://github.com/deanm0000/Async-Sharepoint
Author-email: Dean MacGregor <powertrading121@gmail.com>
Maintainer-email: Dean MacGregor <powertrading121@gmail.com>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: bugs, https://github.com/deanm0000/Async-Sharepoint/issues
Project-URL: changelog, https://github.com/deanm0000/Async-Sharepoint/releases
Project-URL: documentation, https://deanm0000.github.io/Async-Sharepoint/
Project-URL: homepage, https://github.com/deanm0000/Async-Sharepoint

# Async Sharepoint

[![PyPI version](https://img.shields.io/pypi/v/Async-Sharepoint.svg)](https://pypi.org/project/Async-Sharepoint/)
[![PyPI downloads](https://static.pepy.tech/badge/Async-Sharepoint/month)](https://pepy.tech/projects/Async-Sharepoint)

An async SharePoint client with a native Rust implementation exposed through PyO3.

The repository also contains a standalone Rust crate in `core/`, published as
`async-sharepoint`, for Rust projects that do not need Python bindings.

* [GitHub](https://github.com/deanm0000/Async-Sharepoint/) | [PyPI](https://pypi.org/project/Async-Sharepoint/) | [Documentation](https://deanm0000.github.io/Async-Sharepoint/)
* Created by [Dean MacGregor](na) | GitHub [@deanm0000](https://github.com/deanm0000) | PyPI [@deanm0000](https://pypi.org/user/deanm0000/)
* MIT License

## Why this project

The established Python SharePoint libraries are synchronous, which makes large file listings slow
and difficult to use in a server without blocking its event loop. The cost is compounded when each
list item requires another synchronous request before basic file properties such as its name and
path are available.

Async Sharepoint was built to make that workflow asynchronous and significantly faster. It fetches
paginated list results optimistically in parallel and eagerly resolves the additional properties of
returned files and folders concurrently.

This project does not try to cover every SharePoint API. It focuses on fast list,
file, and folder operations. If an application needs broad access to the full SharePoint feature
set, an established general-purpose SharePoint library will be a better fit. I'm not necessarily opposed to making it feature complete, it just isn't a priority.

## Features

* Async list, item, file, folder, permission, and search operations
* Native Entra ID certificate authentication with background token refresh
* Automatic token caching and refresh
* Retry handling for throttling and transient SharePoint failures
* Python 3.10+ stable-ABI Linux wheels
* Eager and optimistic paginated query parallelization
* Eager and parallelized item refinement when getting lists


## Installation

```bash
uv add Async-Sharepoint
## or
pip install Async-Sharepoint
```

### Rust

```bash
cargo add async-sharepoint
```

```rust
use async_sharepoint::{CertificateCredential, SharePointClient};

let credential = CertificateCredential::load(
    tenant_id,
    client_id,
    "/path/to/private.key",
    thumbprint,
)?;
let client = SharePointClient::new(site_url, &credential)?;
let files = client.ls(None).await?;
```

## Usage

```python
from async_sharepoint import CertificateCredential, SharePointClient

credential = CertificateCredential(
    tenant_id=tenant_id,
    client_id=client_id,
    private_key_path="/path/to/private.key",
    thumbprint=thumbprint,
)

async with SharePointClient(site_url, credential) as client:
    documents = await client.get_items("Documents")
```

## Documentation

Full documentation is available on
[GitHub Pages](https://deanm0000.github.io/Async-Sharepoint/).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and
documentation instructions.


