Skip to content

Commit 63707a9

Browse files
committed
📦 NEW: First commit
0 parents  commit 63707a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4346
-0
lines changed

.env.example

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Langbase API credentials
2+
LANGBASE_API_KEY=your_langbase_api_key_here
3+
4+
# Optional: Provider-specific API keys for various services
5+
# LLM provider keys
6+
ANTHROPIC_API_KEY=your_anthropic_key_here
7+
OPENAI_API_KEY=your_openai_key_here
8+
GOOGLE_AI_API_KEY=your_google_key_here
9+
10+
# Tool provider keys
11+
CRAWL_KEY=your_spider_cloud_key_here
12+
EXA_API_KEY=your_exa_key_here
13+
14+
# Custom base URL (optional)
15+
# LANGBASE_BASE_URL=https://eu-api.langbase.com
16+
17+
# Development settings
18+
DEBUG=false
19+
TIMEOUT=30

.gitignore

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Python-specific
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
MANIFEST
23+
24+
# Unit test / coverage reports
25+
htmlcov/
26+
.tox/
27+
.nox/
28+
.coverage
29+
.coverage.*
30+
.cache
31+
nosetests.xml
32+
coverage.xml
33+
*.cover
34+
.hypothesis/
35+
.pytest_cache/
36+
37+
# Environments
38+
.env
39+
.venv
40+
env/
41+
venv/
42+
ENV/
43+
env.bak/
44+
venv.bak/
45+
46+
# VS Code
47+
.vscode/
48+
*.code-workspace
49+
50+
# PyCharm
51+
.idea/
52+
*.iml
53+
*.iws
54+
*.ipr
55+
*.iws
56+
.idea_modules/
57+
58+
# Jupyter Notebook
59+
.ipynb_checkpoints
60+
61+
# Documentation
62+
_build/
63+
site/
64+
65+
# macOS
66+
.DS_Store
67+
.AppleDouble
68+
.LSOverride
69+
Icon
70+
._*
71+
.DocumentRevisions-V100
72+
.fseventsd
73+
.Spotlight-V100
74+
.TemporaryItems
75+
.Trashes
76+
.VolumeIcon.icns
77+
.com.apple.timemachine.donotpresent
78+
79+
# Windows
80+
Thumbs.db
81+
ehthumbs.db
82+
ehthumbs_vista.db
83+
*.stackdump
84+
[Dd]esktop.ini
85+
$RECYCLE.BIN/
86+
*.cab
87+
*.msi
88+
*.msix
89+
*.msm
90+
*.msp
91+
*.lnk
92+
93+
# Credential files and logs
94+
*.log
95+
credentials.json
96+
token.json
97+
98+
# Test files
99+
test_output/
100+
temp/
101+
tmp/
102+
103+
# Local environment configuration
104+
.env.local
105+
.env.development
106+
.env.test
107+
.env.production
108+
109+
# MyPy cache
110+
.mypy_cache/

Makefile

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
.PHONY: clean clean-build clean-pyc help test lint format build
2+
.DEFAULT_GOAL := help
3+
4+
define PRINT_HELP_PYSCRIPT
5+
import re, sys
6+
7+
for line in sys.stdin:
8+
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
9+
if match:
10+
target, help = match.groups()
11+
print("%-20s %s" % (target, help))
12+
endef
13+
export PRINT_HELP_PYSCRIPT
14+
15+
help:
16+
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
17+
18+
clean: clean-build clean-pyc ## remove all build, test, coverage and Python artifacts
19+
20+
clean-build: ## remove build artifacts
21+
rm -fr build/
22+
rm -fr dist/
23+
rm -fr .eggs/
24+
find . -name '*.egg-info' -exec rm -fr {} +
25+
find . -name '*.egg' -exec rm -f {} +
26+
27+
clean-pyc: ## remove Python file artifacts
28+
find . -name '*.pyc' -exec rm -f {} +
29+
find . -name '*.pyo' -exec rm -f {} +
30+
find . -name '*~' -exec rm -f {} +
31+
find . -name '__pycache__' -exec rm -fr {} +
32+
33+
lint: ## check style with flake8
34+
flake8 langbase tests examples
35+
36+
format: ## format code with black and isort
37+
black langbase tests examples
38+
isort langbase tests examples
39+
40+
test: ## run tests
41+
pytest
42+
43+
test-cov: ## run tests with coverage report
44+
pytest --cov=langbase --cov-report=term --cov-report=html
45+
46+
venv: ## create virtual environment
47+
python -m venv venv
48+
@echo "Run 'source venv/bin/activate' to activate the virtual environment"
49+
50+
dev-install: ## install the package in development mode
51+
pip install -e ".[dev]"
52+
53+
build: clean ## build the package
54+
python -m build
55+
56+
publish-test: build ## publish package to TestPyPI
57+
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
58+
59+
publish: build ## publish package to PyPI
60+
twine upload dist/*
61+
62+
install-test: ## install package from TestPyPI
63+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple langbase
64+
65+
examples: ## run examples
66+
@echo "Running examples..."
67+
@for example in $(shell find examples -name "*.py" | sort); do \
68+
echo "\nRunning $${example}:"; \
69+
python $${example}; \
70+
done
71+
72+
docs: ## generate Sphinx documentation
73+
sphinx-apidoc -o docs/source langbase
74+
$(MAKE) -C docs clean
75+
$(MAKE) -C docs html

0 commit comments

Comments
 (0)