{"id":25403100,"url":"https://github.com/devvsima/aiogram-sqlalchemy-template","last_synced_at":"2025-04-12T13:45:18.731Z","repository":{"id":277141320,"uuid":"929507100","full_name":"devvsima/aiogram-sqlalchemy-template","owner":"devvsima","description":"aiogram sqlalchemy template | aiogram3, aiogram2","archived":false,"fork":false,"pushed_at":"2025-03-10T11:08:36.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"aiogram3","last_synced_at":"2025-03-10T12:23:31.697Z","etag":null,"topics":["aiogram","aiogram-bot","aiogram-bot-template","aiogram2","aiogram3","aiosqlite","alembic","i18n","postgresql","redis","sqlalchemy","sqlite","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devvsima.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-08T17:52:00.000Z","updated_at":"2025-03-10T11:08:39.000Z","dependencies_parsed_at":"2025-02-12T11:31:54.595Z","dependency_job_id":"1bcf90b1-ef5c-4db1-8209-f385df8d1363","html_url":"https://github.com/devvsima/aiogram-sqlalchemy-template","commit_stats":null,"previous_names":["devvsima/aiogram-sqlalchemy-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvsima%2Faiogram-sqlalchemy-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvsima%2Faiogram-sqlalchemy-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvsima%2Faiogram-sqlalchemy-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvsima%2Faiogram-sqlalchemy-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devvsima","download_url":"https://codeload.github.com/devvsima/aiogram-sqlalchemy-template/tar.gz/refs/heads/aiogram3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248574887,"owners_count":21127083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiogram","aiogram-bot","aiogram-bot-template","aiogram2","aiogram3","aiosqlite","alembic","i18n","postgresql","redis","sqlalchemy","sqlite","telegram","telegram-bot"],"created_at":"2025-02-16T02:27:54.890Z","updated_at":"2025-04-12T13:45:18.711Z","avatar_url":"https://github.com/devvsima.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aiogram sqlalchemy template\n\n- `Aiogram 3`\n- `i18n`\n- `Redis`\n- `SQLAlchemy`\n- `PostgreSQL \\ Sqlite`\n\n---\n\n## 📥 How to Install?\n\n### 1. Clone the Repository\nFirst, clone the repository and navigate to its directory:\n\n```bash\ngit clone https://github.com/devvsima/aiogram-sqlalchemy-template.git\ncd tgbot\n```\n\n### 2. Setting up a virtual environment \".venv\"\n\n#### Linux\nInstall dependencies and activate the virtual environment:\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip3 install -r requirements.txt\n```\n\n#### Windows\nSimilar steps for Windows:\n\n```bash\npython -m venv .venv\n.venv\\Scripts\\activate\npip install -r requirements.txt\n```\n\n\u003e 💡 Note: The name `.venv` can be changed to anything else you wish.\n\n### 3. Setting environment variable\n\nFirst, copy the `.env.dist` file and rename it to `.env`:\n\n```bash\ncp .env.dist .env\n```\n\nThen edit the environment variables file:\n\n```bash\nvim .env\n# or\nnano .env\n```\n\n### 4. Bot settings\n\n#### `ADMINS` - Admin IDs\nAdd admin IDs, separating them with commas\n\n```bash\n# example\nADMINS=12345678,12345677,12345676\n```\n\n#### `TOKEN` - Bot token from [@BotFather](https://t.me/BotFather)\nAdd your bot token:\n\n```bash\n# example\nBOT_TOKEN=123452345243:Asdfasdfasf\n```\n\n### 5. Configuring the PostgreSQL database\n\nSet the database connection parameters:\n\n- `DB_NAME` - database name\n- `DB_HOST` - database host (default = 'localhost')\n- `DB_PORT` - database port (default = `5432`)\n- `DB_USER` - database user\n- `DB_PASS` - database password\n\n### 6. Configuring Redis\n\nRedis is used for caching and storing session data. Set up the Redis connection parameters in the `.env` file:\n\n- `REDIS_HOST` - Redis server host (default: `localhost`)\n- `REDIS_PORT` - Redis server port (default: `6379`)\n- `REDIS_DB` - Redis database index (default: `5`)\n- `REDIS_URL` - Redis connection URL (optional)\n\nExample:\n```bash\nREDIS_HOST=localhost\nREDIS_PORT=6379\nREDIS_DB=5\n```\n\nEnsure that Redis is installed and running before launching the bot. You can start Redis with:\n```bash\nredis-server\n```\n\n---\n\nNow the bot is ready to run! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevvsima%2Faiogram-sqlalchemy-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevvsima%2Faiogram-sqlalchemy-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevvsima%2Faiogram-sqlalchemy-template/lists"}