Metadata-Version: 2.4
Name: anaplan-sdk
Version: 0.4.0a1
Summary: Provides pythonic access to the Anaplan API
Project-URL: Homepage, https://vinzenzklass.github.io/anaplan-sdk/
Project-URL: Repository, https://github.com/VinzenzKlass/anaplan-sdk
Project-URL: Documentation, https://vinzenzklass.github.io/anaplan-sdk/
Author-email: Vinzenz Klass <vinzenz.klass@valantic.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: anaplan,anaplan alm api,anaplan api,anaplan audit api,anaplan bulk api,anaplan integration
Requires-Python: >=3.10.4
Requires-Dist: httpx<1.0.0,>=0.27.0
Requires-Dist: pydantic<3.0.0,>=2.7.2
Provides-Extra: cert
Requires-Dist: cryptography<45.0.0,>=42.0.7; extra == 'cert'
Provides-Extra: oauth
Requires-Dist: oauthlib<4.0.0,>=3.0.0; extra == 'oauth'
Description-Content-Type: text/markdown

<p align="center" style="margin: 0 0 10px">
  <img width="200" height="200" src="https://vinzenzklass.github.io/anaplan-sdk/img/anaplan-sdk.webp" alt='Python' style="border-radius: 15px">
</p>

<h1 align="center" style="font-size: 3rem; font-weight: 400; margin: -15px 0">
Anaplan SDK
</h1>

<p align="center" style="margin-top: 15px">
<a href="https://pepy.tech/project/anaplan-sdk">
<img align="center" src="https://static.pepy.tech/badge/anaplan-sdk/month" alt="Downloads Badge"/>
</a>
</p>

---

Anaplan SDK is an independent, unofficial project providing pythonic access to Anaplan. Anaplan SDK provides high-level
abstractions over the various Anaplan APIs, so you can focus on you requirements rather than spend time on
implementation details like authentication, error handling, chunking, compression and data formatting.

This Projects supports
the [Bulk APIs](https://help.anaplan.com/use-the-bulk-apis-93218e5e-00e5-406e-8361-09ab861889a7),
the [Transactional APIs](https://help.anaplan.com/use-the-transactional-apis-cc1c1e91-39fc-4272-a4b5-16bc91e9c313) and
the [ALM APIs](https://help.anaplan.com/application-lifecycle-management-api-2565cfa6-e0c2-4e24-884e-d0df957184d6),
the [Audit APIs](https://auditservice.docs.apiary.io/#),
providing both synchronous and asynchronous Clients.

Visit [Anaplan SDK](https://vinzenzklass.github.io/anaplan-sdk/) for documentation.

If you find any issues or feel that this SDK is not adequately covering your use case,
please [open an issue](https://github.com/VinzenzKlass/anaplan-sdk/issues/new).

---

### Install Anaplan SDK using pip

```shell
pip install anaplan-sdk
```

### Instantiate a client

```python
import anaplan_sdk

anaplan = anaplan_sdk.Client(
    workspace_id="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
    model_id="11111111111111111111111111111111",
    user_email="admin@company.com",
    password="my_super_secret_password",
)
```

### Find workspaces and models

If you don't know the workspace and model Ids, instantiate client with authentication information only and
call `.list_workspaces()` and list `.list_models()`

```python
anaplan = anaplan_sdk.Client(
    user_email="admin@company.com",
    password="my_super_secret_password",
)

for workspace in anaplan.list_workspaces():
    print(f"{workspace.name}: {workspace.id}")

for model in anaplan.list_models():
    print(f"{model.name}: {model.id}")
```

### Async Support

This SDK also provides an `AsyncClient` with full async support

```python
import asyncio

anaplan = anaplan_sdk.AsyncClient(
    workspace_id="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
    model_id="11111111111111111111111111111111",
    user_email="admin@company.com",
    password="my_super_secret_password",
)
workspaces, models = await asyncio.gather(
    anaplan.list_workspaces(), anaplan.list_models()
)
for workspace in workspaces:
    print(f"{workspace.name}: {workspace.id}")
for model in models:
    print(f"{model.name}: {model.id}")
```

For more information, API reference and detailed guides,
visit [Anaplan SDK](https://vinzenzklass.github.io/anaplan-sdk/).

### Contributing

Pull Requests are welcome. For major changes, please open an issue first to discuss what you would like to change. To
submit a pull request, please follow the
standard [Fork & Pull Request workflow](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).

Before submitting your pull request, please ensure that all the files pass linting and formatting checks. You can do
this by running the following command:

```shell
uv sync --dev

ruff check
ruff format
```

You can also enable [pre-commit](https://pre-commit.com/) hooks to automatically format and lint your code before
committing:

```shell
pre-commit install
```

If your PR goes beyond a simple bug fix or small changes, please add tests to cover your changes.
