gazu 0.10.24__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.
Files changed (54) hide show
  1. gazu-0.10.24/LICENSE +165 -0
  2. gazu-0.10.24/PKG-INFO +162 -0
  3. gazu-0.10.24/README.rst +117 -0
  4. gazu-0.10.24/gazu/__init__.py +113 -0
  5. gazu-0.10.24/gazu/__version__.py +1 -0
  6. gazu-0.10.24/gazu/asset.py +537 -0
  7. gazu-0.10.24/gazu/cache.py +214 -0
  8. gazu-0.10.24/gazu/casting.py +190 -0
  9. gazu-0.10.24/gazu/client.py +823 -0
  10. gazu-0.10.24/gazu/concept.py +149 -0
  11. gazu-0.10.24/gazu/context.py +151 -0
  12. gazu-0.10.24/gazu/edit.py +175 -0
  13. gazu-0.10.24/gazu/encoder.py +15 -0
  14. gazu-0.10.24/gazu/entity.py +142 -0
  15. gazu-0.10.24/gazu/events.py +92 -0
  16. gazu-0.10.24/gazu/exception.py +89 -0
  17. gazu-0.10.24/gazu/files.py +1340 -0
  18. gazu-0.10.24/gazu/helpers.py +140 -0
  19. gazu-0.10.24/gazu/person.py +434 -0
  20. gazu-0.10.24/gazu/playlist.py +255 -0
  21. gazu-0.10.24/gazu/project.py +448 -0
  22. gazu-0.10.24/gazu/scene.py +193 -0
  23. gazu-0.10.24/gazu/shot.py +686 -0
  24. gazu-0.10.24/gazu/sorting.py +11 -0
  25. gazu-0.10.24/gazu/sync.py +664 -0
  26. gazu-0.10.24/gazu/task.py +1328 -0
  27. gazu-0.10.24/gazu/user.py +354 -0
  28. gazu-0.10.24/gazu.egg-info/PKG-INFO +162 -0
  29. gazu-0.10.24/gazu.egg-info/SOURCES.txt +53 -0
  30. gazu-0.10.24/gazu.egg-info/dependency_links.txt +1 -0
  31. gazu-0.10.24/gazu.egg-info/not-zip-safe +1 -0
  32. gazu-0.10.24/gazu.egg-info/requires.txt +28 -0
  33. gazu-0.10.24/gazu.egg-info/top_level.txt +1 -0
  34. gazu-0.10.24/pyproject.toml +2 -0
  35. gazu-0.10.24/setup.cfg +61 -0
  36. gazu-0.10.24/setup.py +14 -0
  37. gazu-0.10.24/tests/test_asset.py +590 -0
  38. gazu-0.10.24/tests/test_cache.py +118 -0
  39. gazu-0.10.24/tests/test_casting.py +156 -0
  40. gazu-0.10.24/tests/test_client.py +488 -0
  41. gazu-0.10.24/tests/test_concept.py +155 -0
  42. gazu-0.10.24/tests/test_context.py +380 -0
  43. gazu-0.10.24/tests/test_edit.py +215 -0
  44. gazu-0.10.24/tests/test_entity.py +133 -0
  45. gazu-0.10.24/tests/test_files.py +1232 -0
  46. gazu-0.10.24/tests/test_helpers.py +121 -0
  47. gazu-0.10.24/tests/test_person.py +343 -0
  48. gazu-0.10.24/tests/test_playlist.py +221 -0
  49. gazu-0.10.24/tests/test_project.py +480 -0
  50. gazu-0.10.24/tests/test_scene.py +303 -0
  51. gazu-0.10.24/tests/test_shot.py +766 -0
  52. gazu-0.10.24/tests/test_sync.py +153 -0
  53. gazu-0.10.24/tests/test_task.py +1080 -0
  54. gazu-0.10.24/tests/test_user.py +313 -0
gazu-0.10.24/LICENSE ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
gazu-0.10.24/PKG-INFO ADDED
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.2
2
+ Name: gazu
3
+ Version: 0.10.24
4
+ Summary: Gazu is a client for Zou, the API to store the data of your CG production.
5
+ Home-page: https://gazu.cg-wire.com/
6
+ Author: CG Wire
7
+ Author-email: frank@cg-wire.com
8
+ License: GNU Library or Lesser General Public License (LGPL)
9
+ Keywords: cg,production,asset manager,asset,shot,tasks,tracking
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Web Environment
12
+ Classifier: Framework :: Flask
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Natural Language :: English
15
+ Classifier: Programming Language :: Python :: 2.7
16
+ Classifier: Programming Language :: Python :: 3.6
17
+ Classifier: Programming Language :: Python :: 3.7
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: Implementation :: CPython
25
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
26
+ Classifier: Topic :: Multimedia :: Graphics
27
+ Requires-Python: >= 2.7, != 3.0.*, != 3.1.*, != 3.2.*, != 3.3.*, != 3.4.*, != 3.5.*, != 3.6.1, != 3.6.2
28
+ License-File: LICENSE
29
+ Requires-Dist: python-socketio[client]<6,>=5.11.0; python_version != "2.7"
30
+ Requires-Dist: requests>=2.25.1
31
+ Requires-Dist: Deprecated==1.2.15
32
+ Requires-Dist: pywin32>=308; sys_platform == "win32" and python_version != "2.7"
33
+ Provides-Extra: dev
34
+ Requires-Dist: wheel; extra == "dev"
35
+ Provides-Extra: test
36
+ Requires-Dist: pytest; extra == "test"
37
+ Requires-Dist: pytest-cov; extra == "test"
38
+ Requires-Dist: requests_mock; extra == "test"
39
+ Requires-Dist: multipart; python_version >= "3.13" and extra == "test"
40
+ Provides-Extra: lint
41
+ Requires-Dist: autoflake==2.3.1; python_version >= "3.8" and extra == "lint"
42
+ Requires-Dist: black==24.10.0; python_version >= "3.9" and extra == "lint"
43
+ Requires-Dist: pre-commit==4.0.1; python_version >= "3.9" and extra == "lint"
44
+ Dynamic: requires-python
45
+
46
+ .. figure:: https://zou.cg-wire.com/kitsu.png
47
+ :alt: Kitsu Logo
48
+
49
+
50
+ Gazu, Python client for the Kitsu API
51
+ =====================================
52
+
53
+ The Kitsu Python client allows you to fetch data easily from the Kitsu
54
+ collaboration platform. With Gazu, you bring assets and shots data into your
55
+ pipeline tools. It comes with extra features such as preview publishing and
56
+ event stream listening.
57
+
58
+ It is made to be used with the `Kitsu API <https://zou.cg-wire.com>`__. It
59
+ requires an up-and-running instance of Kitsu to run correctly.
60
+
61
+ |CI badge| |Discord| |Downloads|
62
+
63
+ Quickstart
64
+ ----------
65
+
66
+ Install Gazu in your application environment via pip:
67
+
68
+ .. code:: bash
69
+
70
+ pip install gazu
71
+
72
+ The client requires a few extra configurations before being used. It
73
+ needs to know where is located the API server and to log in:
74
+
75
+ .. code:: python
76
+
77
+ import gazu
78
+
79
+ gazu.set_host("https://zou-server-url/api")
80
+ gazu.log_in("user@yourdomain.com", "password")
81
+
82
+ Let's finish with an example. Fetch all the open projects:
83
+
84
+ ::
85
+
86
+ projects = gazu.project.all_open_projects()
87
+
88
+
89
+ Documentation
90
+ -------------
91
+
92
+ Documentation and specification are available on a dedicated website:
93
+
94
+ `https://gazu.cg-wire.com <https://gazu.cg-wire.com>`__
95
+
96
+
97
+ Projects using the Kitsu client
98
+ -------------------------------
99
+
100
+ Our community-built open-source tools connect your content creation tools to
101
+ your Kitsu instance. They are listed below:
102
+
103
+ * `Qtazu <https://github.com/Colorbleed/qtazu>`__: Qt Widgets such as a login
104
+ modal.
105
+ * `Nagato <https://github.com/eaxum/nagato>`__: Publishing and file versioning
106
+ for Blender.
107
+ * `Bamboo <https://github.com/nervYu/Bamboo>`__: Pyside2 widgets to publish
108
+ previews to Kitsu.
109
+ * `Gazu Publisher <https://github.com/cgwire/gazu-publisher>`__: Our work in
110
+ progress publisher tool.
111
+
112
+
113
+ Contributions
114
+ -------------
115
+
116
+ All contributions are welcome as long as they respect the `C4
117
+ contract <https://rfc.zeromq.org/spec:42/C4>`__.
118
+
119
+ The code must follow the pep8 convention.
120
+
121
+ You can use the pre-commit hook for Black (a Python code formatter) before committing :
122
+
123
+ .. code:: bash
124
+
125
+ pip install pre-commit
126
+ pre-commit install
127
+
128
+
129
+ Contributors
130
+ ------------
131
+
132
+ * @aboellinger (Xilam)
133
+ * @BigRoy (Colorbleed)
134
+ * @col-one (Allegorithmic)
135
+ * @EvanBldy (CGWire) - *maintainer*
136
+ * @flablog (Les Fées Spéciales)
137
+ * @frankrousseau (CGWire) - *maintainer*
138
+ * @kguyaux
139
+ * @LedruRollin (Xilam)
140
+ * @g-Lul (TNZPV)
141
+ * @jdrese (HEAJ)
142
+ * @pcharmoille (Unit Image)
143
+ * @tokejepsen (Bumpybox)
144
+ * @tpodeva
145
+
146
+ About authors
147
+ -------------
148
+
149
+ Kitsu is written by CGWire, a company based in France. We help animation and VFX studios to collaborate better through efficient tooling. We already work with more than 70 studios around the world.
150
+
151
+ Visit `cg-wire.com <https://cg-wire.com>`__ for more information.
152
+
153
+ |CGWire Logo|
154
+
155
+ .. |CI badge| image:: https://github.com/cgwire/gazu/actions/workflows/ci.yml/badge.svg
156
+ :target: https://github.com/cgwire/gazu/actions/workflows/ci.yml
157
+ .. |Discord| image:: https://badgen.net/badge/icon/discord?icon=discord&label
158
+ :target: https://discord.com/invite/VbCxtKN
159
+ .. |CGWire Logo| image:: https://zou.cg-wire.com/cgwire.png
160
+ :target: https://cg-wire.com
161
+ .. |Downloads| image:: https://static.pepy.tech/personalized-badge/gazu?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads
162
+ :target: https://pepy.tech/project/gazu
@@ -0,0 +1,117 @@
1
+ .. figure:: https://zou.cg-wire.com/kitsu.png
2
+ :alt: Kitsu Logo
3
+
4
+
5
+ Gazu, Python client for the Kitsu API
6
+ =====================================
7
+
8
+ The Kitsu Python client allows you to fetch data easily from the Kitsu
9
+ collaboration platform. With Gazu, you bring assets and shots data into your
10
+ pipeline tools. It comes with extra features such as preview publishing and
11
+ event stream listening.
12
+
13
+ It is made to be used with the `Kitsu API <https://zou.cg-wire.com>`__. It
14
+ requires an up-and-running instance of Kitsu to run correctly.
15
+
16
+ |CI badge| |Discord| |Downloads|
17
+
18
+ Quickstart
19
+ ----------
20
+
21
+ Install Gazu in your application environment via pip:
22
+
23
+ .. code:: bash
24
+
25
+ pip install gazu
26
+
27
+ The client requires a few extra configurations before being used. It
28
+ needs to know where is located the API server and to log in:
29
+
30
+ .. code:: python
31
+
32
+ import gazu
33
+
34
+ gazu.set_host("https://zou-server-url/api")
35
+ gazu.log_in("user@yourdomain.com", "password")
36
+
37
+ Let's finish with an example. Fetch all the open projects:
38
+
39
+ ::
40
+
41
+ projects = gazu.project.all_open_projects()
42
+
43
+
44
+ Documentation
45
+ -------------
46
+
47
+ Documentation and specification are available on a dedicated website:
48
+
49
+ `https://gazu.cg-wire.com <https://gazu.cg-wire.com>`__
50
+
51
+
52
+ Projects using the Kitsu client
53
+ -------------------------------
54
+
55
+ Our community-built open-source tools connect your content creation tools to
56
+ your Kitsu instance. They are listed below:
57
+
58
+ * `Qtazu <https://github.com/Colorbleed/qtazu>`__: Qt Widgets such as a login
59
+ modal.
60
+ * `Nagato <https://github.com/eaxum/nagato>`__: Publishing and file versioning
61
+ for Blender.
62
+ * `Bamboo <https://github.com/nervYu/Bamboo>`__: Pyside2 widgets to publish
63
+ previews to Kitsu.
64
+ * `Gazu Publisher <https://github.com/cgwire/gazu-publisher>`__: Our work in
65
+ progress publisher tool.
66
+
67
+
68
+ Contributions
69
+ -------------
70
+
71
+ All contributions are welcome as long as they respect the `C4
72
+ contract <https://rfc.zeromq.org/spec:42/C4>`__.
73
+
74
+ The code must follow the pep8 convention.
75
+
76
+ You can use the pre-commit hook for Black (a Python code formatter) before committing :
77
+
78
+ .. code:: bash
79
+
80
+ pip install pre-commit
81
+ pre-commit install
82
+
83
+
84
+ Contributors
85
+ ------------
86
+
87
+ * @aboellinger (Xilam)
88
+ * @BigRoy (Colorbleed)
89
+ * @col-one (Allegorithmic)
90
+ * @EvanBldy (CGWire) - *maintainer*
91
+ * @flablog (Les Fées Spéciales)
92
+ * @frankrousseau (CGWire) - *maintainer*
93
+ * @kguyaux
94
+ * @LedruRollin (Xilam)
95
+ * @g-Lul (TNZPV)
96
+ * @jdrese (HEAJ)
97
+ * @pcharmoille (Unit Image)
98
+ * @tokejepsen (Bumpybox)
99
+ * @tpodeva
100
+
101
+ About authors
102
+ -------------
103
+
104
+ Kitsu is written by CGWire, a company based in France. We help animation and VFX studios to collaborate better through efficient tooling. We already work with more than 70 studios around the world.
105
+
106
+ Visit `cg-wire.com <https://cg-wire.com>`__ for more information.
107
+
108
+ |CGWire Logo|
109
+
110
+ .. |CI badge| image:: https://github.com/cgwire/gazu/actions/workflows/ci.yml/badge.svg
111
+ :target: https://github.com/cgwire/gazu/actions/workflows/ci.yml
112
+ .. |Discord| image:: https://badgen.net/badge/icon/discord?icon=discord&label
113
+ :target: https://discord.com/invite/VbCxtKN
114
+ .. |CGWire Logo| image:: https://zou.cg-wire.com/cgwire.png
115
+ :target: https://cg-wire.com
116
+ .. |Downloads| image:: https://static.pepy.tech/personalized-badge/gazu?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads
117
+ :target: https://pepy.tech/project/gazu
@@ -0,0 +1,113 @@
1
+ from . import client as raw
2
+ from . import cache
3
+ from . import helpers
4
+
5
+ try:
6
+ from . import events
7
+ except ImportError:
8
+ pass
9
+
10
+ from . import asset
11
+ from . import casting
12
+ from . import context
13
+ from . import edit
14
+ from . import entity
15
+ from . import files
16
+ from . import project
17
+ from . import person
18
+ from . import shot
19
+ from . import sync
20
+ from . import task
21
+ from . import user
22
+ from . import playlist
23
+ from . import concept
24
+
25
+ from .exception import (
26
+ AuthFailedException,
27
+ ParameterException,
28
+ NotAuthenticatedException,
29
+ )
30
+ from .__version__ import __version__
31
+
32
+
33
+ def get_host(client=raw.default_client):
34
+ return raw.get_host(client=client)
35
+
36
+
37
+ def set_host(url, client=raw.default_client):
38
+ raw.set_host(url, client=client)
39
+
40
+
41
+ def log_in(
42
+ email,
43
+ password,
44
+ totp=None,
45
+ email_otp=None,
46
+ fido_authentication_response=None,
47
+ recovery_code=None,
48
+ client=raw.default_client,
49
+ ):
50
+ tokens = {}
51
+ try:
52
+ tokens = raw.post(
53
+ "auth/login",
54
+ {
55
+ "email": email,
56
+ "password": password,
57
+ "totp": totp,
58
+ "email_otp": email_otp,
59
+ "fido_authentication_response": fido_authentication_response,
60
+ "recovery_code": recovery_code,
61
+ },
62
+ client=client,
63
+ )
64
+ except (NotAuthenticatedException, ParameterException):
65
+ pass
66
+
67
+ if not tokens or (
68
+ "login" in tokens and tokens.get("login", False) == False
69
+ ):
70
+ raise AuthFailedException
71
+ else:
72
+ raw.set_tokens(tokens, client=client)
73
+ return tokens
74
+
75
+
76
+ def send_email_otp(email, client=raw.default_client):
77
+ return raw.get("auth/email-otp", params={"email": email}, client=client)
78
+
79
+
80
+ def log_out(client=raw.default_client):
81
+ tokens = {}
82
+ try:
83
+ raw.get("auth/logout", client=client)
84
+ except ParameterException:
85
+ pass
86
+ raw.set_tokens(tokens, client=client)
87
+ return tokens
88
+
89
+
90
+ def refresh_access_token(client=raw.default_client):
91
+ return client.refresh_access_token()
92
+
93
+
94
+ def get_event_host(client=raw.default_client):
95
+ return raw.get_event_host(client=client)
96
+
97
+
98
+ def set_event_host(url, client=raw.default_client):
99
+ raw.set_event_host(url, client=client)
100
+
101
+
102
+ def set_token(token, client=raw.default_client):
103
+ """
104
+ Store authentication token to reuse them for all requests.
105
+
106
+ Args:
107
+ new_tokens (dict): Tokens to use for authentication.
108
+ """
109
+
110
+ if isinstance(token, dict):
111
+ return raw.set_tokens(token, client=client)
112
+ else:
113
+ return raw.set_tokens({"access_token": token}, client=client)
@@ -0,0 +1 @@
1
+ __version__ = "0.10.24"