tokenator 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
tokenator/__init__.py CHANGED
@@ -4,6 +4,7 @@ import logging
4
4
  from .client_openai import OpenAIWrapper
5
5
  from . import usage
6
6
  from .utils import get_default_db_path, is_colab
7
+ from .migrations import check_and_run_migrations
7
8
 
8
9
  __version__ = "0.1.0"
9
10
  __all__ = ["OpenAIWrapper", "usage", "get_default_db_path", "is_colab"]
@@ -11,8 +12,6 @@ __all__ = ["OpenAIWrapper", "usage", "get_default_db_path", "is_colab"]
11
12
  logger = logging.getLogger(__name__)
12
13
 
13
14
  try:
14
- # Always run migrations, even in Colab
15
- from .migrations import check_and_run_migrations
16
15
  check_and_run_migrations()
17
16
  except Exception as e:
18
17
  logger.warning(f"Failed to run migrations, but continuing anyway: {e}")
tokenator/utils.py CHANGED
@@ -47,4 +47,10 @@ def get_default_db_path() -> str:
47
47
  # Fallback to current directory if we can't create the default path
48
48
  fallback_path = os.path.join(os.getcwd(), "tokenator_usage.db")
49
49
  logger.warning(f"Could not create default db path, falling back to {fallback_path}. Error: {e}")
50
- return fallback_path
50
+ return fallback_path
51
+
52
+ __all__ = [
53
+ "get_default_db_path",
54
+ "is_colab",
55
+ # ... other exports ...
56
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tokenator
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Token usage tracking wrapper for LLMs
5
5
  License: MIT
6
6
  Author: Ujjwal Maheshwari
@@ -1,4 +1,4 @@
1
- tokenator/__init__.py,sha256=YsjMbOFztjrOKWNyguFcadzPKwhj3uaw0gRJQkCoRaM,566
1
+ tokenator/__init__.py,sha256=Kd9pj2-EIaeTek17PCThIOEmyiV7Nf6PPeoDwKdxikM,519
2
2
  tokenator/base_wrapper.py,sha256=vSu_pStKYulho7_5g0jMCNf84KRxC4kTKep0v8YE61M,2377
3
3
  tokenator/client_anthropic.py,sha256=1ejWIZBxtk-mWTVaKWeMUvS2hZ_Dn-vNKYa3yopdjAU,6714
4
4
  tokenator/client_openai.py,sha256=1xZuRA90kwlflTwEuFkXJHHN584XTeNh1CfEBMLELbQ,6308
@@ -10,8 +10,8 @@ tokenator/migrations.py,sha256=BFgZRsdIx-Qs_WwDaH6cyi2124mLf5hA8VrIlW7f7Mg,1134
10
10
  tokenator/models.py,sha256=EprE_MMJxDS-YXlcIQLZzfekH7xTYbeOC3bx3B2osVw,1171
11
11
  tokenator/schemas.py,sha256=V7NYfY9eZvH3J6uOwXJz4dSAU6WYzINRnfFi1wWsTcc,2280
12
12
  tokenator/usage.py,sha256=aHjGwzDzaiVznahNk5HqVyk3IxDo5FtFVfOUCeE7DZ4,7833
13
- tokenator/utils.py,sha256=BzfyWZkKt-2Jw_DCS7tY3iicBynklgvmf_1cPGe-OEI,1883
14
- tokenator-0.1.5.dist-info/LICENSE,sha256=wdG-B6-ODk8RQ4jq5uXSn0w1UWTzCH_MMyvh7AwtGns,1074
15
- tokenator-0.1.5.dist-info/METADATA,sha256=jVSteW5iVYoqLT727GZUIdmuPNtG3rK7cvPqEBLMmHo,2444
16
- tokenator-0.1.5.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
17
- tokenator-0.1.5.dist-info/RECORD,,
13
+ tokenator/utils.py,sha256=5mDiGHgt4koCY0onHwkRjwZIuAgP6QvrDZCwD20Sdk8,1969
14
+ tokenator-0.1.6.dist-info/LICENSE,sha256=wdG-B6-ODk8RQ4jq5uXSn0w1UWTzCH_MMyvh7AwtGns,1074
15
+ tokenator-0.1.6.dist-info/METADATA,sha256=NhA9J73Li63N-1CbboKzpPXAp8clES5BnbJ0zALjPx8,2444
16
+ tokenator-0.1.6.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
17
+ tokenator-0.1.6.dist-info/RECORD,,