init-data-py 0.2.1__tar.gz → 0.2.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.
Files changed (22) hide show
  1. {init_data_py-0.2.1 → init_data_py-0.2.2}/PKG-INFO +1 -1
  2. {init_data_py-0.2.1 → init_data_py-0.2.2}/pyproject.toml +1 -1
  3. {init_data_py-0.2.1 → init_data_py-0.2.2}/src/init_data_py/__init__.py +1 -1
  4. {init_data_py-0.2.1 → init_data_py-0.2.2}/src/init_data_py/init_data.py +1 -1
  5. {init_data_py-0.2.1 → init_data_py-0.2.2}/.github/workflows/publish.yml +0 -0
  6. {init_data_py-0.2.1 → init_data_py-0.2.2}/.gitignore +0 -0
  7. {init_data_py-0.2.1 → init_data_py-0.2.2}/.python-version +0 -0
  8. {init_data_py-0.2.1 → init_data_py-0.2.2}/LICENCE +0 -0
  9. {init_data_py-0.2.1 → init_data_py-0.2.2}/README.md +0 -0
  10. {init_data_py-0.2.1 → init_data_py-0.2.2}/requirements-dev.lock +0 -0
  11. {init_data_py-0.2.1 → init_data_py-0.2.2}/requirements.lock +0 -0
  12. {init_data_py-0.2.1 → init_data_py-0.2.2}/src/init_data_py/errors/__init__.py +0 -0
  13. {init_data_py-0.2.1 → init_data_py-0.2.2}/src/init_data_py/errors/errors.py +0 -0
  14. {init_data_py-0.2.1 → init_data_py-0.2.2}/src/init_data_py/types/__init__.py +0 -0
  15. {init_data_py-0.2.1 → init_data_py-0.2.2}/src/init_data_py/types/chat.py +0 -0
  16. {init_data_py-0.2.1 → init_data_py-0.2.2}/src/init_data_py/types/object.py +0 -0
  17. {init_data_py-0.2.1 → init_data_py-0.2.2}/src/init_data_py/types/user.py +0 -0
  18. {init_data_py-0.2.1 → init_data_py-0.2.2}/tests/__init__.py +0 -0
  19. {init_data_py-0.2.1 → init_data_py-0.2.2}/tests/test_parse.py +0 -0
  20. {init_data_py-0.2.1 → init_data_py-0.2.2}/tests/test_sign.py +0 -0
  21. {init_data_py-0.2.1 → init_data_py-0.2.2}/tests/test_to_query_string.py +0 -0
  22. {init_data_py-0.2.1 → init_data_py-0.2.2}/tests/test_validate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: init-data-py
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A Python library that provides tools for using and validating Telegram web app init data.
5
5
  Author-email: nimaxin <nimaxin@proton.me>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "init-data-py"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "A Python library that provides tools for using and validating Telegram web app init data."
5
5
  authors = [
6
6
  { name = "nimaxin", email = "nimaxin@proton.me" }
@@ -1,5 +1,5 @@
1
1
  from .init_data import InitData
2
2
 
3
- __version__ = "0.2.1"
3
+ __version__ = "0.2.2"
4
4
 
5
5
  __all__ = ["InitData"]
@@ -113,7 +113,7 @@ class InitData:
113
113
 
114
114
  if lifetime is not None:
115
115
  auth_date = datetime.fromtimestamp(self.auth_date)
116
- expire_date = auth_date - timedelta(seconds=lifetime)
116
+ expire_date = auth_date + timedelta(seconds=lifetime)
117
117
  if datetime.now() > expire_date:
118
118
  if raise_error:
119
119
  raise errors.ExpiredError()
File without changes
File without changes
File without changes