{"id":20703832,"url":"https://github.com/euiyounghwang/db-interface-export","last_synced_at":"2026-04-29T01:02:30.855Z","repository":{"id":244239635,"uuid":"805409182","full_name":"euiyounghwang/DB-Interface-Export","owner":"euiyounghwang","description":"Python DB Interface with Prometheus-Export","archived":false,"fork":false,"pushed_at":"2026-02-26T17:01:10.000Z","size":3732,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-26T23:13:02.610Z","etag":null,"topics":["fastapi","oracle","prometheus-exporter"],"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/euiyounghwang.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-05-24T14:06:37.000Z","updated_at":"2026-02-26T17:00:35.000Z","dependencies_parsed_at":"2024-06-13T15:47:47.347Z","dependency_job_id":"88358d73-84e4-4028-998a-2062d3e6c9e2","html_url":"https://github.com/euiyounghwang/DB-Interface-Export","commit_stats":null,"previous_names":["euiyounghwang/db-interface-export"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/euiyounghwang/DB-Interface-Export","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FDB-Interface-Export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FDB-Interface-Export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FDB-Interface-Export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FDB-Interface-Export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/euiyounghwang","download_url":"https://codeload.github.com/euiyounghwang/DB-Interface-Export/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FDB-Interface-Export/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fastapi","oracle","prometheus-exporter"],"created_at":"2024-11-17T01:09:44.284Z","updated_at":"2026-04-29T01:02:30.850Z","avatar_url":"https://github.com/euiyounghwang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DB-Interface-Export\n\u003ci\u003ePython DB Interface with Prometheus-Export\n\nFastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python.\nThis is a repository that provides to deliver the records to the Prometheus-Export application.\n\n\n### Install Poerty\n```\nhttps://python-poetry.org/docs/?ref=dylancastillo.co#installing-with-the-official-installer\n```\n\n\n### Using Python Virtual Environment\n```bash\npython -m venv .venv\nsource .venv/bin/activate\n```\n\n\n### Using Poetry: Create the virtual environment in the same directory as the project and install the dependencies:\n- Gunicorn is a Python WSGI HTTP Server that usually lives between a reverse proxy (e.g., Nginx) or load balancer (e.g., AWS ELB) and a web application such as Django or Flask.\n- Better performance by optimizing Gunicorn config (https://medium.com/building-the-system/gunicorn-3-means-of-concurrency-efbb547674b7)\n- The suggested number of workers is (2*CPU)+1.\n- gunicorn --workers=5 --threads=2 --worker-class=gthread main:app, the maximum concurrent requests areworkers * threads 10 in our case.\n\n```bash\npoetry config virtualenvs.in-project true\npoetry init\npoetry add fastapi\npoetry add uvicorn\npoetry add pytz\npoetry add httpx\npoetry add pytest\npoetry add pytest-cov\npoetry add requests\npoetry add python-dotenv\npoetry add JPype1\npoetry add psycopg2-binary\npoetry add jaydebeapi\n\n...\n\n# start with gunicorn config\ngunicorn.config.py\n\nimport multiprocessing\n \nworkers = multiprocessing.cpu_count() * 2 + 1\nworker_class = \"uvicorn.workers.UvicornWorker\"\nwsgi_app = \"app.main:app\"\ntimeout = 60\nloglevel = \"info\"\nbind = \"0.0.0.0:8000\"\nmax_requests = 1000\nmax_requests_jitter = 100\n\n...\ngunicorn -c app/gunicorn.config.py\n\ngunicorn -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:8004 --workers 4\n\n..\nuvicorn app.main:app --reload for dev\n```\nor you can run this shell script `./create_virtual_env.sh` to make an environment. then go to virtual enviroment using `source .venv/bin/activate`\n\n\n### Register Service\n- sudo service db_es_api status/stop/start/restart\n```bash\n#-- /etc/systemd/system/db_es_api.service\n[Unit]\nDescription=DB ES Service\n\n[Service]\nUser=devuser\nGroup=devuser\nType=simple\nExecStart=/bin/bash /home/devuser/db_interface_api/service-start.sh\nExecStop= /usr/bin/killall db_es_service\n\n[Install]\nWantedBy=default.target\n\n\n# Service command\nsudo systemctl daemon-reload \nsudo systemctl enable db_es_api.service\nsudo systemctl start db_es_api.service \nsudo systemctl status db_es_api.service \nsudo systemctl stop db_es_api.service \n\nsudo service db_es_api status/stop/start\n```\n\n\n### Service\n- Run this command `./start-start.sh` or python -m uvicorn main:app --reload --host=0.0.0.0 --port=8002 --workers 4\n- Service : http://localhost:8002/docs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuiyounghwang%2Fdb-interface-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuiyounghwang%2Fdb-interface-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuiyounghwang%2Fdb-interface-export/lists"}