met-share 1.0__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.
met_share/__init__.py ADDED
@@ -0,0 +1,119 @@
1
+ """met-share: a Python SDK for ClipBox pickup-code sharing.
2
+
3
+ Two ways in, deliberately different:
4
+
5
+ - :class:`MetShare` — async, explicit, any deployment. The full surface.
6
+ - module-level functions — synchronous, bound to the public instance. Convenience
7
+ for scripts; anything else is a sign to instantiate :class:`MetShare`.
8
+
9
+ A pickup code may point at a file, text, or a link. Use :func:`info` to find out
10
+ which before deciding how to pick it up — it never consumes an access::
11
+
12
+ from met_share import info, receive, save
13
+
14
+ meta = info("72349")
15
+ if meta.kind == "file":
16
+ save("72349", "out.pdf") # consumes 1 access
17
+ else:
18
+ print(receive("72349").content) # consumes 1 access
19
+ """
20
+
21
+ from __future__ import annotations
22
+
23
+ from ._client import DEFAULT_BASE, MetShare
24
+ from ._errors import (
25
+ Forbidden,
26
+ HashMismatch,
27
+ InvalidRequest,
28
+ MetShareError,
29
+ NetworkError,
30
+ NotAFile,
31
+ NotFound,
32
+ RateLimited,
33
+ ServerError,
34
+ SourceChanged,
35
+ Timeout,
36
+ TooLarge,
37
+ Unauthorized,
38
+ UnexpectedResponse,
39
+ Unsupported,
40
+ UploadIncomplete,
41
+ UploadSessionExpired,
42
+ )
43
+ from ._models import (
44
+ ClipKind,
45
+ ClipMeta,
46
+ DownloadResult,
47
+ FileClip,
48
+ Progress,
49
+ ReceivedClip,
50
+ ReceivedFile,
51
+ ReceivedLink,
52
+ ReceivedText,
53
+ SiteConfig,
54
+ TextClip,
55
+ UploadedClip,
56
+ )
57
+ from ._sync import (
58
+ configure,
59
+ info,
60
+ read,
61
+ receive,
62
+ save,
63
+ send_file,
64
+ send_text,
65
+ shared,
66
+ shutdown,
67
+ stream,
68
+ )
69
+
70
+ __version__ = "0.1.0"
71
+
72
+ __all__ = [
73
+ "DEFAULT_BASE",
74
+ # models
75
+ "ClipKind",
76
+ "ClipMeta",
77
+ "DownloadResult",
78
+ "FileClip",
79
+ "Forbidden",
80
+ "HashMismatch",
81
+ "InvalidRequest",
82
+ # clients
83
+ "MetShare",
84
+ # errors
85
+ "MetShareError",
86
+ "NetworkError",
87
+ "NotAFile",
88
+ "NotFound",
89
+ "Progress",
90
+ "RateLimited",
91
+ "ReceivedClip",
92
+ "ReceivedFile",
93
+ "ReceivedLink",
94
+ "ReceivedText",
95
+ "ServerError",
96
+ "SiteConfig",
97
+ "SourceChanged",
98
+ "TextClip",
99
+ "Timeout",
100
+ "TooLarge",
101
+ "Unauthorized",
102
+ "UnexpectedResponse",
103
+ "Unsupported",
104
+ "UploadIncomplete",
105
+ "UploadSessionExpired",
106
+ "UploadedClip",
107
+ "__version__",
108
+ "configure",
109
+ "info",
110
+ "read",
111
+ "receive",
112
+ "save",
113
+ # sync helpers
114
+ "send_file",
115
+ "send_text",
116
+ "shared",
117
+ "shutdown",
118
+ "stream",
119
+ ]