{"id":31642469,"url":"https://github.com/tameronline/ll-db-builder","last_synced_at":"2025-10-07T03:59:39.493Z","repository":{"id":302170993,"uuid":"1011493728","full_name":"TamerOnLine/ll-db-builder","owner":"TamerOnLine","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-01T00:23:00.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T00:33:21.970Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/TamerOnLine.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,"zenodo":null}},"created_at":"2025-06-30T23:00:31.000Z","updated_at":"2025-07-01T00:23:03.000Z","dependencies_parsed_at":"2025-07-01T00:33:25.721Z","dependency_job_id":"cd80a8d8-ef23-4e51-8b16-7f4177bb8f02","html_url":"https://github.com/TamerOnLine/ll-db-builder","commit_stats":null,"previous_names":["tameronline/ll-db-builder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TamerOnLine/ll-db-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fll-db-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fll-db-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fll-db-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fll-db-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TamerOnLine","download_url":"https://codeload.github.com/TamerOnLine/ll-db-builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TamerOnLine%2Fll-db-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717434,"owners_count":26033542,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-07T03:59:32.954Z","updated_at":"2025-10-07T03:59:39.487Z","avatar_url":"https://github.com/TamerOnLine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛠️ ll-db-builder\n\n**ll-db-builder** is a professional Python project that automatically sets up the PostgreSQL database for Flask-based or general systems using SQLAlchemy.  \nIt loads connection settings from `.env`, ensures the database exists, and creates all required tables based on the defined models in `main/models`.\n\n---\n\n## 🚀 Features\n\n- ✅ Initializes all tables using SQLAlchemy\n- ✅ Secure loading of settings via `.env`\n- ✅ Clean and professional project structure\n- ✅ Ready to integrate with CI or Flask projects\n\n---\n\n## 📁 Project Structure\n\n```bash\nll-db-builder/\n├── main/\n│   ├── config/         # Environment and configuration loading\n│   ├── models/         # Database models\n│   └── extensions.py   # SQLAlchemy configuration\n├── .env                # Database connection settings\n├── build.py            # Main script to initialize DB and tables\n├── requirements.txt    # Main project dependencies\n├── test-requirements.txt  # Test-specific dependencies\n└── README.md           # This file\n```\n\n---\n\n## ⚙️ Usage\n\n### 1. Create a virtual environment\n\n```bash\npython -m venv venv\nvenv\\Scripts\\activate  # On Windows\n# or\nsource venv/bin/activate  # On Linux/Mac\n\npip install -r requirements.txt\n```\n\n### 2. Configure environment variables\n\nCreate a `.env` file in the root directory with:\n\n```env\nDB_NAME=ll_db\nDB_USER=postgres\nDB_PASSWORD=yourpassword\nDB_HOST=127.0.0.1\nDB_PORT=5432\n```\n\n### 3. Run the script\n\n```bash\npython build.py\n```\n\n---\n\n## 🧱 Key Files\n\n| File | Purpose |\n|------|---------|\n| `build.py` | Entry point – loads config and builds database/tables |\n| `config_loader.py` | Loads environment variables |\n| `db_initializer.py` | Ensures DB exists and initializes tables |\n| `models/*.py` | SQLAlchemy table definitions |\n| `extensions.py` | Defines `db` and `Base` for reuse |\n\n---\n\n## 🧪 Testing (Optional)\n\n```bash\npip install -r test-requirements.txt\npytest\n```\n\n---\n\n## 📝 License\n\nMIT License – See [LICENSE](LICENSE) for details.\n\n---\n\n## 👨‍💻 Author\n\n- **Tamer Faour** – [@TamerOnLine](https://github.com/TamerOnLine)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Fll-db-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftameronline%2Fll-db-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftameronline%2Fll-db-builder/lists"}