prismadata 0.3.1__tar.gz → 0.3.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prismadata
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Python client for the PrismaData location intelligence API
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -43,7 +43,18 @@ from .exceptions import (
43
43
  ValidationError,
44
44
  )
45
45
 
46
- __version__ = "0.3.1"
46
+ from importlib.metadata import version as _pkg_version, PackageNotFoundError
47
+
48
+ try:
49
+ __version__ = _pkg_version("prismadata")
50
+ except PackageNotFoundError:
51
+ # Fallback for editable installs or running from source
52
+ from pathlib import Path as _Path
53
+ import re as _re
54
+
55
+ _pyproject = _Path(__file__).resolve().parent.parent / "pyproject.toml"
56
+ _match = _re.search(r'^version\s*=\s*"([^"]+)"', _pyproject.read_text(), _re.MULTILINE)
57
+ __version__ = _match.group(1) if _match else "0.0.0"
47
58
 
48
59
  __all__ = [
49
60
  "AsyncClient",
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "prismadata"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "Python client for the PrismaData location intelligence API"
5
5
  authors = ["PrismaData <contato@prismadata.io>"]
6
6
  license = "MIT"
File without changes
File without changes