darwin-supply 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- darwin_supply-0.1.0/LICENSE +21 -0
- darwin_supply-0.1.0/PKG-INFO +44 -0
- darwin_supply-0.1.0/README.md +19 -0
- darwin_supply-0.1.0/pyproject.toml +40 -0
- darwin_supply-0.1.0/setup.cfg +4 -0
- darwin_supply-0.1.0/src/darwin_supply/__init__.py +44 -0
- darwin_supply-0.1.0/src/darwin_supply/py.typed +1 -0
- darwin_supply-0.1.0/src/darwin_supply.egg-info/PKG-INFO +44 -0
- darwin_supply-0.1.0/src/darwin_supply.egg-info/SOURCES.txt +11 -0
- darwin_supply-0.1.0/src/darwin_supply.egg-info/dependency_links.txt +1 -0
- darwin_supply-0.1.0/src/darwin_supply.egg-info/requires.txt +1 -0
- darwin_supply-0.1.0/src/darwin_supply.egg-info/top_level.txt +1 -0
- darwin_supply-0.1.0/tests/test_supply.py +18 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Darwin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: darwin-supply
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official Python entry package for Darwin Supply
|
|
5
|
+
Author: Darwin
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Documentation, https://docs.darwin.so/supply/overview
|
|
8
|
+
Project-URL: Issues, https://github.com/darwin-studios/darwin-supply-python/issues
|
|
9
|
+
Project-URL: Repository, https://github.com/darwin-studios/darwin-supply-python
|
|
10
|
+
Keywords: darwin,supply,seller,sdk,api
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: darwin-sdk<1.0.0,>=0.1.1
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# Darwin Supply for Python
|
|
27
|
+
|
|
28
|
+
The official Python entry package for Darwin Supply. It uses the complete
|
|
29
|
+
Fern-generated [`darwin-sdk`](https://pypi.org/project/darwin-sdk/) contract
|
|
30
|
+
with seller-focused constructors.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install darwin-supply
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from darwin_supply import create_supply_client
|
|
38
|
+
|
|
39
|
+
supply = create_supply_client(token="YOUR_SERVER_SIDE_TOKEN")
|
|
40
|
+
listings = supply.listings.list_listings(ai_id="ai_123")
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Keep service credentials on your trusted backend. Darwin enforces business
|
|
44
|
+
ownership, permissions, listing revisions, payouts, and transaction state.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Darwin Supply for Python
|
|
2
|
+
|
|
3
|
+
The official Python entry package for Darwin Supply. It uses the complete
|
|
4
|
+
Fern-generated [`darwin-sdk`](https://pypi.org/project/darwin-sdk/) contract
|
|
5
|
+
with seller-focused constructors.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install darwin-supply
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from darwin_supply import create_supply_client
|
|
13
|
+
|
|
14
|
+
supply = create_supply_client(token="YOUR_SERVER_SIDE_TOKEN")
|
|
15
|
+
listings = supply.listings.list_listings(ai_id="ai_123")
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Keep service credentials on your trusted backend. Darwin enforces business
|
|
19
|
+
ownership, permissions, listing revisions, payouts, and transaction state.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77.0.3"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "darwin-supply"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Official Python entry package for Darwin Supply"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{ name = "Darwin" }]
|
|
13
|
+
keywords = ["darwin", "supply", "seller", "sdk", "api"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Typing :: Typed",
|
|
24
|
+
]
|
|
25
|
+
dependencies = ["darwin-sdk>=0.1.1,<1.0.0"]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Documentation = "https://docs.darwin.so/supply/overview"
|
|
29
|
+
Issues = "https://github.com/darwin-studios/darwin-supply-python/issues"
|
|
30
|
+
Repository = "https://github.com/darwin-studios/darwin-supply-python"
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.packages.find]
|
|
33
|
+
where = ["src"]
|
|
34
|
+
include = ["darwin_supply*"]
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.package-data]
|
|
37
|
+
darwin_supply = ["py.typed"]
|
|
38
|
+
|
|
39
|
+
[tool.pytest.ini_options]
|
|
40
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Darwin Supply clients backed by the Fern-generated Darwin SDK."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from darwin_sdk import AsyncDarwin, Darwin
|
|
8
|
+
|
|
9
|
+
DarwinSupply = Darwin
|
|
10
|
+
AsyncDarwinSupply = AsyncDarwin
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def create_supply_client(*, token: str, **options: Any) -> Darwin:
|
|
14
|
+
"""Create a synchronous seller client using a server-side service token."""
|
|
15
|
+
|
|
16
|
+
return Darwin(token=token, **options)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def create_business_client(*, token: str, **options: Any) -> Darwin:
|
|
20
|
+
"""Create a synchronous client for business-AI-scoped Supply operations."""
|
|
21
|
+
|
|
22
|
+
return Darwin(token=token, **options)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def create_async_supply_client(*, token: str, **options: Any) -> AsyncDarwin:
|
|
26
|
+
"""Create an asynchronous seller client."""
|
|
27
|
+
|
|
28
|
+
return AsyncDarwin(token=token, **options)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def create_async_business_client(*, token: str, **options: Any) -> AsyncDarwin:
|
|
32
|
+
"""Create an asynchronous business-AI-scoped client."""
|
|
33
|
+
|
|
34
|
+
return AsyncDarwin(token=token, **options)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"AsyncDarwinSupply",
|
|
39
|
+
"DarwinSupply",
|
|
40
|
+
"create_async_business_client",
|
|
41
|
+
"create_async_supply_client",
|
|
42
|
+
"create_business_client",
|
|
43
|
+
"create_supply_client",
|
|
44
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: darwin-supply
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official Python entry package for Darwin Supply
|
|
5
|
+
Author: Darwin
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Documentation, https://docs.darwin.so/supply/overview
|
|
8
|
+
Project-URL: Issues, https://github.com/darwin-studios/darwin-supply-python/issues
|
|
9
|
+
Project-URL: Repository, https://github.com/darwin-studios/darwin-supply-python
|
|
10
|
+
Keywords: darwin,supply,seller,sdk,api
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: darwin-sdk<1.0.0,>=0.1.1
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# Darwin Supply for Python
|
|
27
|
+
|
|
28
|
+
The official Python entry package for Darwin Supply. It uses the complete
|
|
29
|
+
Fern-generated [`darwin-sdk`](https://pypi.org/project/darwin-sdk/) contract
|
|
30
|
+
with seller-focused constructors.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install darwin-supply
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from darwin_supply import create_supply_client
|
|
38
|
+
|
|
39
|
+
supply = create_supply_client(token="YOUR_SERVER_SIDE_TOKEN")
|
|
40
|
+
listings = supply.listings.list_listings(ai_id="ai_123")
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Keep service credentials on your trusted backend. Darwin enforces business
|
|
44
|
+
ownership, permissions, listing revisions, payouts, and transaction state.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/darwin_supply/__init__.py
|
|
5
|
+
src/darwin_supply/py.typed
|
|
6
|
+
src/darwin_supply.egg-info/PKG-INFO
|
|
7
|
+
src/darwin_supply.egg-info/SOURCES.txt
|
|
8
|
+
src/darwin_supply.egg-info/dependency_links.txt
|
|
9
|
+
src/darwin_supply.egg-info/requires.txt
|
|
10
|
+
src/darwin_supply.egg-info/top_level.txt
|
|
11
|
+
tests/test_supply.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
darwin-sdk<1.0.0,>=0.1.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
darwin_supply
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from darwin_supply import DarwinSupply, create_business_client, create_supply_client
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_exposes_fern_generated_seller_surface() -> None:
|
|
7
|
+
client = create_supply_client(token="supply_test")
|
|
8
|
+
assert isinstance(client, DarwinSupply)
|
|
9
|
+
assert callable(client.listings.list_listings)
|
|
10
|
+
assert callable(client.listings.create_listing)
|
|
11
|
+
assert callable(client.deals.list_deals)
|
|
12
|
+
assert callable(client.billing.get_ai_billing_summary)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_business_client_preserves_transaction_surface() -> None:
|
|
16
|
+
client = create_business_client(token="business_test")
|
|
17
|
+
assert isinstance(client, DarwinSupply)
|
|
18
|
+
assert callable(client.transactions.list_transactions)
|