Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Telegram Bot Configuration
TELEGRAM_TOKEN=your_telegram_token_here

# Optional: Ngrok Configuration (only needed for ngrok mode)
NGROK_TOKEN=your_ngrok_token_here

# Optional: Development Mode
DEV=true

# Optional: PEM file path for self-signed certificates
# PEM_FILE=path/to/certificate.pem
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual Environment
venv/
env/
ENV/
.venv

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# Database
*.db
*.sqlite
*.sqlite3

# Logs
*.log
exceptions.log

# Environment variables
.env
.env.local

# OS
.DS_Store
Thumbs.db

31 changes: 25 additions & 6 deletions repro.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@

## Requirements

- Python 3.12
- sqlite
- requirements

### Setup

```bash
# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
```
pip3 install -r requirements.txt

## Configuration

Create a `.env` file in the project root (copy `.env.example` and fill in your values):

```bash
cp .env.example .env
# Edit .env with your actual tokens
```

Or set environment variables directly:
- `TELEGRAM_TOKEN` - Required
- `NGROK_TOKEN` - Optional, only needed for ngrok mode
- `DEV` - Optional, set to `true` for development mode

## Run With Ngrok

Run without timeout limit:

```
export NGROK_AUTH_TOKEN={TOKEN}
```bash
export NGROK_TOKEN={TOKEN}
export TELEGRAM_TOKEN={TOKEN}
python3 -m src.__init__ ngrok
```

Run with timeout limit:

```
```bash
export TELEGRAM_TOKEN={TOKEN}
python3 -m src.__init__ ngrok
```
Expand All @@ -29,14 +48,14 @@ python3 -m src.__init__ ngrok

Run with self-signed ssl certificate

```
```bash
export TELEGRAM_TOKEN={TOKEN}
python3 -m src.__init__ self-signed
```

Run with authority-signed ssl certificate

```
```bash
export TELEGRAM_TOKEN={TOKEN}
python3 -m src.__init__
```
6 changes: 3 additions & 3 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
black
pytest
asyncio
pytest-asyncio
sqlmodel
sqlalchemy
pyngrok
fastapi
uvicorn
pydantic
typing
httpx
datetime
yfinance
python-dotenv
179 changes: 110 additions & 69 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,110 +1,151 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements.txt requirements.in
# pip-compile requirements.in
#
anyio==3.4.0
annotated-doc==0.0.4
# via fastapi
annotated-types==0.7.0
# via pydantic
anyio==4.11.0
# via
# httpcore
# httpx
# starlette
asgiref==3.4.1
# via uvicorn
asyncio==3.4.3
# via -r requirements.in
attrs==21.2.0
# via pytest
black==21.12b0
beautifulsoup4==4.14.2
# via yfinance
black==25.11.0
# via -r requirements.in
certifi==2021.10.8
certifi==2025.11.12
# via
# curl-cffi
# httpcore
# httpx
charset-normalizer==2.0.9
# via httpx
click==8.0.3
# requests
cffi==2.0.0
# via curl-cffi
charset-normalizer==3.4.4
# via requests
click==8.3.1
# via
# black
# uvicorn
datetime==4.3
# via -r requirements.in
fastapi==0.70.1
curl-cffi==0.13.0
# via yfinance
fastapi==0.121.3
# via -r requirements.in
greenlet==1.1.2
frozendict==2.4.7
# via yfinance
greenlet==3.2.4
# via sqlalchemy
h11==0.12.0
h11==0.16.0
# via
# httpcore
# uvicorn
httpcore==0.14.3
httpcore==1.0.9
# via httpx
httpx==0.21.1
httpx==0.28.1
# via -r requirements.in
idna==3.3
idna==3.11
# via
# anyio
# rfc3986
iniconfig==1.1.1
# via pytest
mypy-extensions==0.4.3
# via black
packaging==21.3
# httpx
# requests
iniconfig==2.3.0
# via pytest
pathspec==0.9.0
multitasking==0.0.12
# via yfinance
mypy-extensions==1.1.0
# via black
platformdirs==2.4.0
numpy==2.3.5
# via
# pandas
# yfinance
packaging==25.0
# via
# black
# pytest
pandas==2.3.3
# via yfinance
pathspec==0.12.1
# via black
pluggy==1.0.0
# via pytest
py==1.11.0
peewee==3.18.3
# via yfinance
platformdirs==4.5.0
# via
# black
# yfinance
pluggy==1.6.0
# via pytest
pydantic==1.8.2
protobuf==6.33.1
# via yfinance
pycparser==2.23
# via cffi
pydantic==2.12.4
# via
# -r requirements.in
# fastapi
# sqlmodel
pyngrok==7.1.2
pydantic-core==2.41.5
# via pydantic
pygments==2.19.2
# via pytest
pyngrok==7.5.0
# via -r requirements.in
pyparsing==3.0.6
# via packaging
pytest==6.2.5
pytest==9.0.1
# via
# -r requirements.in
# pytest-asyncio
pytest-asyncio==1.3.0
# via -r requirements.in
pytz==2021.3
# via datetime
pyyaml==6.0
# via pyngrok
rfc3986[idna2008]==1.5.0
# via httpx
sniffio==1.2.0
python-dateutil==2.9.0.post0
# via pandas
python-dotenv==1.2.1
# via -r requirements.in
pytokens==0.3.0
# via black
pytz==2025.2
# via
# anyio
# httpcore
# httpx
sqlalchemy==1.4.28
# pandas
# yfinance
pyyaml==6.0.3
# via pyngrok
requests==2.32.5
# via yfinance
six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via anyio
soupsieve==2.8
# via beautifulsoup4
sqlalchemy==2.0.44
# via
# -r requirements.in
# sqlmodel
sqlalchemy2-stubs==0.0.2a19
# via sqlmodel
sqlmodel==0.0.4
sqlmodel==0.0.27
# via -r requirements.in
starlette==0.16.0
starlette==0.50.0
# via fastapi
toml==0.10.2
# via pytest
tomli==1.2.3
# via black
typing==3.7.4.3
# via -r requirements.in
typing-extensions==4.0.1
typing-extensions==4.15.0
# via
# black
# anyio
# beautifulsoup4
# fastapi
# pydantic
# sqlalchemy2-stubs
uvicorn==0.16.0
# pydantic-core
# pytest-asyncio
# sqlalchemy
# starlette
# typing-inspection
typing-inspection==0.4.2
# via pydantic
tzdata==2025.2
# via pandas
urllib3==2.5.0
# via requests
uvicorn==0.38.0
# via -r requirements.in
websockets==15.0.1
# via yfinance
yfinance==0.2.66
# via -r requirements.in
zope-interface==5.4.0
# via datetime

# The following packages are considered to be unsafe in a requirements file:
# setuptools
12 changes: 12 additions & 0 deletions run_locally.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# This script runs the Memory Vault application locally
#
# Environment variables can be set in two ways:
# 1. Create a .env file in the project root (copy .env.example and fill in your values)
# 2. Export them directly: export TELEGRAM_TOKEN='your_token'
#
# The application will automatically load variables from .env file if it exists

export DEV='true'
source venv/bin/activate
python3 -m src.__init__ ${1:-} # Pass 'ngrok' as argument to enable ngrok mode
Loading