python-ballchasing 0.1.3__py3-none-any.whl → 0.3.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.
ballchasing/__init__.py CHANGED
@@ -1,36 +1,67 @@
1
- #!/usr/bin/env python
2
- # MIT License
3
- #
4
- # Copyright (c) 2020 Rolv-Arild Braaten
5
- #
6
- # Permission is hereby granted, free of charge, to any person obtaining a copy
7
- # of this software and associated documentation files (the "Software"), to deal
8
- # in the Software without restriction, including without limitation the rights
9
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- # copies of the Software, and to permit persons to whom the Software is
11
- # furnished to do so, subject to the following conditions:
12
- #
13
- # The above copyright notice and this permission notice shall be included in all
14
- # copies or substantial portions of the Software.
15
- #
16
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- # SOFTWARE.
23
-
24
- """A library that provides a Python interface to the Ballchasing API."""
25
- from __future__ import absolute_import
26
-
27
- __author__ = 'Rolv-Arild Braaten'
28
- # __email__ = ''
29
- __copyright__ = 'Copyright (c) 2020 Rolv-Arild Braaten'
30
- __license__ = 'Apache License 2.0'
31
- __version__ = '0.1.2'
32
- __url__ = 'https://github.com/Rolv-Arild/python-ballchasing'
33
- __download_url__ = 'https://pypi.python.org/pypi/python-ballchasing'
34
- __description__ = 'A Python wrapper around the Ballchasing API'
35
-
36
- from .api import Api # noqa
1
+ #!/usr/bin/env python
2
+ # MIT License
3
+ #
4
+ # Copyright (c) 2020 Rolv-Arild Braaten
5
+ #
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+
24
+ """A library that provides a Python interface to the Ballchasing API."""
25
+ import sys
26
+
27
+ # In Python 3.8+, importlib.metadata is in the standard library.
28
+ # For older versions, a backport is available as importlib_metadata.
29
+ if sys.version_info >= (3, 8):
30
+ from importlib.metadata import version, metadata
31
+ else:
32
+ from importlib_metadata import version, metadata
33
+
34
+ try:
35
+ # This will read the version from the installed package's metadata
36
+ # (which is defined in pyproject.toml)
37
+ __version__ = version("python-ballchasing")
38
+
39
+ # You can also get other metadata in a similar way
40
+ pkg_metadata = metadata("python-ballchasing")
41
+ __author__ = pkg_metadata.get("Author-Email")
42
+ __description__ = pkg_metadata.get("Summary")
43
+ except Exception:
44
+ # If the package is not installed (e.g., when running in a development
45
+ # environment without an editable install), you can fall back to defaults.
46
+ __version__ = "0.0.0-dev"
47
+ __description__ = 'A Python wrapper around the Ballchasing API'
48
+ __author__ = 'Rolv-Arild Braaten <rolv_arild@hotmail.com>'
49
+
50
+ # Import the main classes and constants to make them easily accessible to users.
51
+ from .api import BallchasingApi
52
+
53
+ Api = BallchasingApi # For importing like `import ballchasing; api = ballchasing.Api`
54
+
55
+ from .constants import (
56
+ Playlist,
57
+ Rank,
58
+ Season,
59
+ MatchResult,
60
+ ReplaySortBy,
61
+ GroupSortBy,
62
+ SortDir,
63
+ Visibility,
64
+ PlayerIdentification,
65
+ TeamIdentification,
66
+ Map
67
+ )