{"id":24272748,"url":"https://github.com/sorna-fast/fast_api_company","last_synced_at":"2025-07-08T18:32:58.955Z","repository":{"id":260363253,"uuid":"864334925","full_name":"sorna-fast/fast_api_company","owner":"sorna-fast","description":"Building the API of a company's entities with the demo front with Streamlite to run the run.py file","archived":false,"fork":false,"pushed_at":"2025-02-14T14:51:58.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T07:28:26.253Z","etag":null,"topics":["alembic","fastapi","passlib","requests","sqlalchemy","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sorna-fast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-09-28T00:52:53.000Z","updated_at":"2025-02-14T14:52:01.000Z","dependencies_parsed_at":"2025-01-15T19:13:14.850Z","dependency_job_id":"77c4d070-78d1-4f6e-aa8a-35c3a1c25763","html_url":"https://github.com/sorna-fast/fast_api_company","commit_stats":null,"previous_names":["sorna-fast/fast_api_company"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sorna-fast/fast_api_company","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorna-fast%2Ffast_api_company","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorna-fast%2Ffast_api_company/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorna-fast%2Ffast_api_company/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorna-fast%2Ffast_api_company/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sorna-fast","download_url":"https://codeload.github.com/sorna-fast/fast_api_company/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorna-fast%2Ffast_api_company/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264324113,"owners_count":23590806,"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":["alembic","fastapi","passlib","requests","sqlalchemy","streamlit"],"created_at":"2025-01-15T18:53:37.057Z","updated_at":"2025-07-08T18:32:58.938Z","avatar_url":"https://github.com/sorna-fast.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastAPI Company\n\n## درباره پروژه | About the Project\n\nاین پروژه شامل یک API برای مدیریت موجودیت‌های شرکتی است که با استفاده از **FastAPI** ساخته شده و یک رابط کاربری نمایشی با استفاده از **Streamlit** ارائه می‌دهد.  \nThis project provides an API for managing company entities, built with **FastAPI** and accompanied by a demo frontend using **Streamlit**.\n\n## ویژگی‌ها | Features\n\n- **FastAPI**: فریمورک قدرتمند برای ساخت API.  \n  A powerful framework for building APIs.\n- **SQLAlchemy**: مدیریت تعاملات با پایگاه داده.  \n  Manages database interactions.\n- **Alembic**: مدیریت مهاجرت‌های پایگاه داده.  \n  Handles database migrations.\n- **Passlib**: هش کردن رمز عبور.  \n  Manages password hashing.\n- **Streamlit**: رابط کاربری ساده و تعاملی.  \n  Provides a simple and interactive frontend interface.\n\n## نصب و راه‌اندازی | Installation\n\n1. **کلون کردن مخزن | Clone the repository**:\n\n   ```bash\n   git clone https://github.com/sorna-fast/fast_api_company.git\n   cd fast_api_company\n   ```\n   \n2.ایجاد و فعال‌سازی محیط مجازی | Create and activate a virtual environment:\n```\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n3.نصب وابستگی‌ها | Install the dependencies:\n```\npip install -r requirement.txt\n```\n\n## نحوه استفاده | Usage\n1.اجرای مهاجرت‌های پایگاه داده | Apply database migrations:\n```\nalembic upgrade head\n```\n2.اجرای برنامه | Run the application:\n```\npython run.py\n```\n3.دسترسی به رابط کاربری | Access the frontend:\n\nمرورگر خود را باز کرده و به آدرس http://localhost:8501 بروید.\nOpen your browser and navigate to http://localhost:8501.\n\n\n## config\n\n### 1.از کردن فایل main.py:\n\nفایل main.py را در ویرایشگر کد خود باز کنید.\n### 2.یافتن بخش تنظیمات پایگاه داده:\n\nدر این فایل، به دنبال بخشی بگردید که اتصال به پایگاه داده تنظیم شده است. معمولاً چیزی شبیه به این خواهد بود:\n\n```\nSQLALCHEMY_DATABASE_URL = \"sqlite:///./sql_app.db\"\n```\n### 3.ویرایش تنظیمات پایگاه داده:\n\nمقدار SQLALCHEMY_DATABASE_URL را با اطلاعات پایگاه داده خود جایگزین کنید. به عنوان مثال، برای استفاده از یک پایگاه داده PostgreSQL:\n```\nSQLALCHEMY_DATABASE_URL = \"postgresql://user:password@localhost/dbname\"\n```\nجزئیات مربوط به user، password، localhost و dbname را با مقادیر مناسب جایگزین کنید.\n\n### 4.ذخیره تغییرات و اجرای مهاجرت‌ها:\n\nپس از اعمال تغییرات، فایل را ذخیره کنید.\n\nسپس، برای اعمال مهاجرت‌های پایگاه داده، دستور زیر را اجرا کنید:\n```\nalembic upgrade head\n```\nاین دستور ساختار پایگاه داده را به‌روز می‌کند.\n\n### 5.اجرای برنامه:\n\nاکنون می‌توانید برنامه را با دستور زیر اجرا کنید:\n```\npython run.py\n```\n### 📧 ارتباط با من | Contact\nبرای هرگونه سوال یا پیشنهاد، می‌توانید از طریق ایمیل با من تماس بگیرید: masudpythongit@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsorna-fast%2Ffast_api_company","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsorna-fast%2Ffast_api_company","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsorna-fast%2Ffast_api_company/lists"}