synfire 0.0.1__py3-none-any.whl

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.
synfire/__init__.py ADDED
@@ -0,0 +1,84 @@
1
+ """
2
+ Synfire SDK - Python client for the Synfire NIR Model Registry.
3
+
4
+ Synfire is a public registry for hosting and sharing neuromorphic models
5
+ in the Neuromorphic Intermediate Representation (NIR) format. This SDK
6
+ provides programmatic access to search, download, and publish models.
7
+
8
+ Quick Start:
9
+ from synfire import Client
10
+
11
+ # Create a client (uses stored credentials from 'synfire login')
12
+ client = Client()
13
+
14
+ # Search for models targeting T1 hardware
15
+ results = client.search("gesture", platforms=["T1"])
16
+
17
+ # Download a model
18
+ release = client.pull("nrg-lab/gesture-recognition", version="1.0.0")
19
+
20
+ # Load the NIR graph (requires: pip install synfire[nir])
21
+ graph = release.load()
22
+
23
+ Authentication:
24
+ The SDK resolves credentials in this order:
25
+ 1. Token passed to Client(token="...")
26
+ 2. SYNFIRE_TOKEN environment variable
27
+ 3. Stored credentials from 'synfire login' (OS keyring)
28
+
29
+ For CI/CD pipelines, use the environment variable:
30
+ export SYNFIRE_TOKEN="synfire_your_token_here"
31
+
32
+ For more information:
33
+ - Documentation: https://docs.synfire.dev/sdk
34
+ - CLI Reference: https://docs.synfire.dev/cli
35
+ - Web Interface: https://synfire.dev
36
+ """
37
+
38
+ from synfire._version import __version__
39
+ from synfire.client import Client
40
+ from synfire.auth import CredentialStore
41
+ from synfire.constants import HardwareTarget
42
+ from synfire.exceptions import (
43
+ SynfireError,
44
+ AuthenticationError,
45
+ ValidationError,
46
+ NotFoundError,
47
+ ConflictError,
48
+ TombstonedError,
49
+ NetworkError,
50
+ ChecksumMismatchError,
51
+ )
52
+ from synfire.models import (
53
+ Release,
54
+ Repository,
55
+ Organization,
56
+ FileInfo,
57
+ User,
58
+ )
59
+
60
+ __all__ = [
61
+ # Version
62
+ "__version__",
63
+ # Main client
64
+ "Client",
65
+ # Credential management
66
+ "CredentialStore",
67
+ # Enums
68
+ "HardwareTarget",
69
+ # Models
70
+ "Release",
71
+ "Repository",
72
+ "Organization",
73
+ "FileInfo",
74
+ "User",
75
+ # Exceptions
76
+ "SynfireError",
77
+ "AuthenticationError",
78
+ "ValidationError",
79
+ "NotFoundError",
80
+ "ConflictError",
81
+ "TombstonedError",
82
+ "NetworkError",
83
+ "ChecksumMismatchError",
84
+ ]
synfire/__main__.py ADDED
@@ -0,0 +1,13 @@
1
+ """
2
+ Allow running the CLI as: python -m synfire
3
+
4
+ This module serves as the entry point when the package is executed
5
+ as a module, enabling usage like:
6
+ python -m synfire login
7
+ python -m synfire search gesture
8
+ """
9
+
10
+ from synfire.cli import app
11
+
12
+ if __name__ == "__main__":
13
+ app()
synfire/_version.py ADDED
@@ -0,0 +1,7 @@
1
+ """
2
+ Version information for the Synfire SDK.
3
+
4
+ This module is auto-generated and should not be edited manually.
5
+ """
6
+
7
+ __version__ = "0.0.1"