Skip to content

Commit 8f475b2

Browse files
committed
Add README.md.
1 parent 64042fc commit 8f475b2

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.fernignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
# Specify files that shouldn't be modified by Fern
2+
README.md

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Polytomic Python Library
2+
3+
[![pypi](https://img.shields.io/pypi/v/polytomic)](https://pypi.python.org/pypi/polytomic)
4+
5+
The Polytomic Python library provides convenient access to the Polytomic API from Python.
6+
7+
## Installation
8+
9+
```sh
10+
pip install polytomic
11+
```
12+
13+
## Usage
14+
15+
Instantiate and use the client with the following:
16+
17+
```python
18+
from polytomic import BulkSchedule
19+
from polytomic.client import Polytomic
20+
21+
client = Polytomic(
22+
token="YOUR_TOKEN",
23+
)
24+
client.bulk_sync.create(
25+
destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
26+
mode="replicate",
27+
name="My Bulk Sync",
28+
schedule=BulkSchedule(
29+
frequency="manual",
30+
),
31+
source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
32+
)
33+
```
34+
35+
## Async Client
36+
37+
The SDK also exports an `async` client so that you can make non-blocking calls to our API.
38+
39+
```python
40+
from polytomic import BulkSchedule
41+
from polytomic.client import AsyncPolytomic
42+
43+
client = AsyncPolytomic(
44+
token="YOUR_TOKEN",
45+
)
46+
await client.bulk_sync.create(
47+
destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
48+
mode="replicate",
49+
name="My Bulk Sync",
50+
schedule=BulkSchedule(
51+
frequency="manual",
52+
),
53+
source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
54+
)
55+
```
56+
57+
## Contributing
58+
59+
While we value open-source contributions to this SDK, this library is generated programmatically.
60+
Additions made directly to this library would have to be moved over to our generation code,
61+
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
62+
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
63+
an issue first to discuss with us!
64+
65+
On the other hand, contributions to the README are always very welcome!

0 commit comments

Comments
 (0)