meterline 0.2.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.
meterline/__init__.py ADDED
@@ -0,0 +1,59 @@
1
+ """meterline: a common record format for AI usage data (v2)."""
2
+
3
+ from importlib.metadata import PackageNotFoundError as _NotInstalled, version as _version
4
+
5
+ from meterline.convert import convert_v1, convert_v1_batch
6
+ from meterline.records import (
7
+ KINDS,
8
+ MAX_DECIMALS,
9
+ ActivityRecord,
10
+ OrgTotal,
11
+ RecordError,
12
+ SeatAssignment,
13
+ SeatSnapshot,
14
+ UsageRecord,
15
+ actor_cost_failures,
16
+ amount_str,
17
+ batch_failures,
18
+ grain_for,
19
+ latest_per_key,
20
+ quantity_str,
21
+ validate,
22
+ validate_batch,
23
+ )
24
+ from meterline.run import RunResult, note_failure, result_of_run, run_manifests
25
+ from meterline.writers import read_jsonl, write_jsonl, write_parquet
26
+
27
+ try:
28
+ __version__ = _version("meterline") # the one source is pyproject.toml
29
+ except _NotInstalled: # a source tree that is not installed
30
+ __version__ = "0+unknown"
31
+
32
+ __all__ = [
33
+ "KINDS",
34
+ "MAX_DECIMALS",
35
+ "ActivityRecord",
36
+ "OrgTotal",
37
+ "RecordError",
38
+ "RunResult",
39
+ "SeatAssignment",
40
+ "SeatSnapshot",
41
+ "UsageRecord",
42
+ "actor_cost_failures",
43
+ "amount_str",
44
+ "batch_failures",
45
+ "convert_v1",
46
+ "convert_v1_batch",
47
+ "grain_for",
48
+ "latest_per_key",
49
+ "note_failure",
50
+ "quantity_str",
51
+ "read_jsonl",
52
+ "result_of_run",
53
+ "run_manifests",
54
+ "validate",
55
+ "validate_batch",
56
+ "write_jsonl",
57
+ "write_parquet",
58
+ "__version__",
59
+ ]