talkwithdata 0.1.0__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.
- talkwithdata-0.1.0/PKG-INFO +19 -0
- talkwithdata-0.1.0/README.md +7 -0
- talkwithdata-0.1.0/pyproject.toml +84 -0
- talkwithdata-0.1.0/setup.cfg +4 -0
- talkwithdata-0.1.0/src/talkwithdata/app.py +36 -0
- talkwithdata-0.1.0/src/talkwithdata/library/env.py +10 -0
- talkwithdata-0.1.0/src/talkwithdata/library/log.py +15 -0
- talkwithdata-0.1.0/src/talkwithdata.egg-info/PKG-INFO +19 -0
- talkwithdata-0.1.0/src/talkwithdata.egg-info/SOURCES.txt +11 -0
- talkwithdata-0.1.0/src/talkwithdata.egg-info/dependency_links.txt +1 -0
- talkwithdata-0.1.0/src/talkwithdata.egg-info/entry_points.txt +2 -0
- talkwithdata-0.1.0/src/talkwithdata.egg-info/requires.txt +4 -0
- talkwithdata-0.1.0/src/talkwithdata.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: talkwithdata
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Talk with data
|
|
5
|
+
Author-email: Dylan Hogg <dylanhogg@gmail.com>
|
|
6
|
+
Requires-Python: >=3.13
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: loguru>=0.7.3
|
|
9
|
+
Requires-Dist: pydantic>=2.12.5
|
|
10
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
11
|
+
Requires-Dist: typer>=0.21.1
|
|
12
|
+
|
|
13
|
+
# Talk with data
|
|
14
|
+
|
|
15
|
+
Talk with data
|
|
16
|
+
|
|
17
|
+
WIP: project is under development.
|
|
18
|
+
|
|
19
|
+
A simple tool to talk with your data using an LLM.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "talkwithdata"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Talk with data"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "Dylan Hogg", email = "dylanhogg@gmail.com" },
|
|
9
|
+
]
|
|
10
|
+
dependencies = [
|
|
11
|
+
"loguru>=0.7.3",
|
|
12
|
+
"pydantic>=2.12.5",
|
|
13
|
+
"python-dotenv>=1.2.1",
|
|
14
|
+
"typer>=0.21.1",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[dependency-groups]
|
|
18
|
+
dev = [
|
|
19
|
+
"pre-commit>=4.0.1",
|
|
20
|
+
"pyright>=1.1.408",
|
|
21
|
+
"pytest>=9.0.2",
|
|
22
|
+
"pytest-cov>=7.0.0",
|
|
23
|
+
"ruff>=0.14.13",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.scripts]
|
|
27
|
+
app = "talkwithdata.app:app"
|
|
28
|
+
|
|
29
|
+
[tool.ruff]
|
|
30
|
+
line-length = 120
|
|
31
|
+
target-version = "py313"
|
|
32
|
+
|
|
33
|
+
[tool.ruff.format]
|
|
34
|
+
quote-style = "double"
|
|
35
|
+
indent-style = "space"
|
|
36
|
+
skip-magic-trailing-comma = false
|
|
37
|
+
line-ending = "auto"
|
|
38
|
+
|
|
39
|
+
[tool.ruff.lint]
|
|
40
|
+
select = [
|
|
41
|
+
"E", # pycodestyle errors
|
|
42
|
+
"F", # pyflakes
|
|
43
|
+
"I", # import sorting (isort-compatible)
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[tool.pyright]
|
|
47
|
+
pythonVersion = "3.13"
|
|
48
|
+
venvPath = "."
|
|
49
|
+
venv = ".venv"
|
|
50
|
+
include = ["src", "tests"]
|
|
51
|
+
exclude = ["**/__pycache__"]
|
|
52
|
+
typeCheckingMode = "strict" # ["off", "basic", "standard", "strict"]
|
|
53
|
+
|
|
54
|
+
[tool.pytest.ini_options]
|
|
55
|
+
pythonpath = ["src"]
|
|
56
|
+
addopts = "--cov=talkwithdata --cov-report=term-missing"
|
|
57
|
+
|
|
58
|
+
[tool.coverage.run]
|
|
59
|
+
branch = true
|
|
60
|
+
source = ["talkwithdata"]
|
|
61
|
+
relative_files = true
|
|
62
|
+
|
|
63
|
+
[tool.coverage.paths]
|
|
64
|
+
source = ["src/talkwithdata"]
|
|
65
|
+
|
|
66
|
+
[tool.coverage.report]
|
|
67
|
+
fail_under = 80
|
|
68
|
+
precision = 1
|
|
69
|
+
skip_covered = true
|
|
70
|
+
show_missing = true
|
|
71
|
+
exclude_also = [
|
|
72
|
+
"if TYPE_CHECKING:",
|
|
73
|
+
"raise NotImplementedError",
|
|
74
|
+
"except NotImplementedError:",
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
[tool.coverage.html]
|
|
78
|
+
directory = "htmlcov"
|
|
79
|
+
|
|
80
|
+
[tool.coverage.xml]
|
|
81
|
+
output = "coverage.xml"
|
|
82
|
+
|
|
83
|
+
[tool.uv]
|
|
84
|
+
package = true
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import time
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
|
|
5
|
+
import typer
|
|
6
|
+
from dotenv import load_dotenv
|
|
7
|
+
from loguru import logger
|
|
8
|
+
|
|
9
|
+
from talkwithdata.library import log
|
|
10
|
+
|
|
11
|
+
if not load_dotenv():
|
|
12
|
+
logger.warning("Failed to load .env file")
|
|
13
|
+
|
|
14
|
+
app = typer.Typer(pretty_exceptions_enable=False, pretty_exceptions_show_locals=True)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@app.command()
|
|
18
|
+
def main(required_arg: str, optional_arg: str | None = None) -> int:
|
|
19
|
+
log.configure()
|
|
20
|
+
|
|
21
|
+
run_id = f"{datetime.now().strftime('%Y%m%d-%H%M%S')}"
|
|
22
|
+
t0 = time.time()
|
|
23
|
+
|
|
24
|
+
logger.info(f"Hello! {required_arg=}, {optional_arg=}")
|
|
25
|
+
logger.info(f"PYTHONPATH={os.getenv('PYTHONPATH', 'Not set')}")
|
|
26
|
+
logger.info(f"LOG_STDERR_LEVEL={os.getenv('LOG_STDERR_LEVEL', 'Not set. Copy `.env_template` to `.env`')}")
|
|
27
|
+
logger.info(f"LOG_FILE_LEVEL={os.getenv('LOG_FILE_LEVEL', 'Not set. Copy `.env_template` to `.env`')}")
|
|
28
|
+
# raise NotImplementedError("app.main() not implemented")
|
|
29
|
+
|
|
30
|
+
took = time.time() - t0
|
|
31
|
+
logger.info(f"Run {run_id} finished in {took:.2f} seconds.")
|
|
32
|
+
return 0
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
if __name__ == "__main__":
|
|
36
|
+
app()
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def get(name: str, default: str | None = None) -> str | None:
|
|
5
|
+
if os.getenv(name) is None and default is None:
|
|
6
|
+
raise ValueError(f"{name} environment variable is not set.")
|
|
7
|
+
elif os.getenv(name) is None:
|
|
8
|
+
return default
|
|
9
|
+
else:
|
|
10
|
+
return os.environ[name]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
from loguru import logger
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def configure(remove_existing: bool = True, logfile: str = "./log/app.log") -> None:
|
|
8
|
+
if remove_existing:
|
|
9
|
+
logger.remove()
|
|
10
|
+
logger.add(sys.stderr, level=os.getenv("LOG_STDERR_LEVEL", "INFO"))
|
|
11
|
+
logger.add(
|
|
12
|
+
logfile,
|
|
13
|
+
level=os.getenv("LOG_FILE_LEVEL", "DEBUG"),
|
|
14
|
+
rotation=os.getenv("LOG_FILE_ROTATION", "00:00"),
|
|
15
|
+
)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: talkwithdata
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Talk with data
|
|
5
|
+
Author-email: Dylan Hogg <dylanhogg@gmail.com>
|
|
6
|
+
Requires-Python: >=3.13
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: loguru>=0.7.3
|
|
9
|
+
Requires-Dist: pydantic>=2.12.5
|
|
10
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
11
|
+
Requires-Dist: typer>=0.21.1
|
|
12
|
+
|
|
13
|
+
# Talk with data
|
|
14
|
+
|
|
15
|
+
Talk with data
|
|
16
|
+
|
|
17
|
+
WIP: project is under development.
|
|
18
|
+
|
|
19
|
+
A simple tool to talk with your data using an LLM.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/talkwithdata/app.py
|
|
4
|
+
src/talkwithdata.egg-info/PKG-INFO
|
|
5
|
+
src/talkwithdata.egg-info/SOURCES.txt
|
|
6
|
+
src/talkwithdata.egg-info/dependency_links.txt
|
|
7
|
+
src/talkwithdata.egg-info/entry_points.txt
|
|
8
|
+
src/talkwithdata.egg-info/requires.txt
|
|
9
|
+
src/talkwithdata.egg-info/top_level.txt
|
|
10
|
+
src/talkwithdata/library/env.py
|
|
11
|
+
src/talkwithdata/library/log.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
talkwithdata
|