Skip to content

Commit 29e733f

Browse files
Release 1.5.0
1 parent f6c238f commit 29e733f

File tree

32 files changed

+3608
-6280
lines changed

32 files changed

+3608
-6280
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ jobs:
3232
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
3333
- name: Install dependencies
3434
run: poetry install
35+
3536
- name: Test
36-
run: poetry run pytest .
37+
run: poetry run pytest ./tests/custom/
3738

3839
publish:
3940
needs: [compile, test]

README.md

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

poetry.lock

Lines changed: 43 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,45 @@ version = "1.5.0"
44
description = ""
55
readme = "README.md"
66
authors = []
7+
keywords = []
8+
license = "MIT"
9+
classifiers = [
10+
"Intended Audience :: Developers",
11+
"Programming Language :: Python",
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3.8",
14+
"Programming Language :: Python :: 3.9",
15+
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
18+
"Operating System :: OS Independent",
19+
"Operating System :: POSIX",
20+
"Operating System :: MacOS",
21+
"Operating System :: POSIX :: Linux",
22+
"Operating System :: Microsoft :: Windows",
23+
"Topic :: Software Development :: Libraries :: Python Modules",
24+
"Typing :: Typed",
25+
"License :: OSI Approved :: MIT License"
26+
]
727
packages = [
828
{ include = "polytomic", from = "src"}
929
]
1030

31+
[project.urls]
32+
Repository = 'https://github.com/polytomic/polytomic-python'
33+
1134
[tool.poetry.dependencies]
1235
python = "^3.8"
1336
httpx = ">=0.21.2"
1437
pydantic = ">= 1.9.2"
1538
typing_extensions = ">= 4.0.0"
1639

1740
[tool.poetry.dev-dependencies]
18-
mypy = "1.9.0"
41+
mypy = "1.0.1"
1942
pytest = "^7.4.0"
2043
pytest-asyncio = "^0.23.5"
2144
python-dateutil = "^2.9.0"
45+
types-python-dateutil = "^2.9.0.20240316"
2246

2347
[tool.pytest.ini_options]
2448
testpaths = [ "tests" ]

src/polytomic/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
BulkDiscover,
1111
BulkExecutionStatus,
1212
BulkField,
13+
BulkFilter,
1314
BulkItemizedSchedule,
1415
BulkMultiScheduleConfiguration,
16+
BulkMultiScheduleType,
1517
BulkSchedule,
1618
BulkSchema,
1719
BulkSchemaEnvelope,
@@ -185,8 +187,10 @@
185187
"BulkDiscover",
186188
"BulkExecutionStatus",
187189
"BulkField",
190+
"BulkFilter",
188191
"BulkItemizedSchedule",
189192
"BulkMultiScheduleConfiguration",
193+
"BulkMultiScheduleType",
190194
"BulkSchedule",
191195
"BulkSchema",
192196
"BulkSchemaEnvelope",

0 commit comments

Comments
 (0)