{"id":19809454,"url":"https://github.com/adilius/digg_ml-ai_api","last_synced_at":"2026-05-07T05:36:30.918Z","repository":{"id":126142043,"uuid":"402759681","full_name":"Adilius/DIGG_ML-AI_API","owner":"Adilius","description":"Web API for evaluating datasets in JSON or CSV format","archived":false,"fork":false,"pushed_at":"2021-10-28T11:32:17.000Z","size":294,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T18:25:16.992Z","etag":null,"topics":["docker","fastapi","postgresql","uvicorn"],"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/Adilius.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":"2021-09-03T12:17:18.000Z","updated_at":"2021-11-30T18:28:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"efbb7f68-6392-41d8-b8e8-70c31a2cde1d","html_url":"https://github.com/Adilius/DIGG_ML-AI_API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Adilius/DIGG_ML-AI_API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adilius%2FDIGG_ML-AI_API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adilius%2FDIGG_ML-AI_API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adilius%2FDIGG_ML-AI_API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adilius%2FDIGG_ML-AI_API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adilius","download_url":"https://codeload.github.com/Adilius/DIGG_ML-AI_API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adilius%2FDIGG_ML-AI_API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273228069,"owners_count":25067714,"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-09-02T02:00:09.530Z","response_time":77,"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":["docker","fastapi","postgresql","uvicorn"],"created_at":"2024-11-12T09:17:06.873Z","updated_at":"2026-05-07T05:36:25.901Z","avatar_url":"https://github.com/Adilius.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"418\" height=\"418\" src=\"https://user-images.githubusercontent.com/43440295/139247048-9c04a67f-b325-47b2-bef6-71b4df965a42.png\" alt='ode'\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cem\u003eOpen Data Evaluator\u003c/em\u003e\n\u003c/p\u003e\n\n---\n\n# DIGG project A.\nEnabling open data for machine learning and AI\n\n# Setup\n\nClone the repository: `git clone https://github.com/Adilius/DIGG_ML-AI_API.git`\n\n# Run docker\n\nStart docker desktop\n\nBuild \u0026 run docker image: `docker-compose up`\n\nBuild \u0026 run docker image from scratch: `docker-compose up --build --force-recreate`\n\n# Run single files\n\nRun build \u0026 run docker first\n\nOpen bash terminal in virtual enviroment: `docker exec -it api bash`\n\n# Run tests\n\nTest API service: `docker-compose exec api_service pytest . -v`\n\nTest DB service: `docker-compose exec db_service pytest . -v`\n\n# Access url to API docs\n\nDocs urls: http://localhost:8080/docs\n\n| Link        | ~Time           |\n| ------------- |:-------------:|\n| [Kronofogden1](https://kronofogden.entryscape.net/rowstore/dataset/9a1d6efb-d34c-4b8c-890f-f1625050a6bd?_limit=500\u0026_offset=0)      | 11s |\n| [Kronofogden2](https://kronofogden.entryscape.net/rowstore/dataset/84b8876c-091a-4b00-a625-918060ce10b9?_limit=500\u0026_offset=0)      | 13s |\n| [Kronofogden3](https://kronofogden.entryscape.net/store/2/resource/201)      | 11s |\n| [Konsumentverket1](https://konsumentverket.entryscape.net/rowstore/dataset/ee53f020-2d4a-4a77-bffd-2b940dec5589)      | 11s |\n\n# Project structure\n\n```\n├── api-service                         # Directory for API service container\n│   ├── Dockerfile                      # Dockerfile for API service container\n│   ├── requirements.txt                # Requirements for Python modules used by container\n│   │\n│   └── app                             # Directory containing all application logic\n│       ├── __init__.py                 # Initialize module \n│       ├── main.py                     # Starts FastAPI server\n│       └── router                      # Contains logic for /api/ routes\n│           ├── __init__.py             # Initialize module\n│           └── api.py                  # Handles /api/ routes\n│\n├── db-service                          # Directory for database service container\n│   ├── Dockerfile                      # Dockerfile for database service container\n│   ├── requirements.txt                # Requirements for Python modules used by container\n│   │\n│   ├── alembic                         # Directory containing logic for creating database structure\n│   │   ├── versions                    # Directory containing most recent database structure\n│   │   │   └── new_migration.py        # Conversion file from python class to database tables\n│   │   ├── env.py                      # Envionment file for alembic and access to database\n│   │   ├── README                      # Alembic explained\n│   │   └── script.py.mako              # Updates migrationfiles when needed\n│   ├── models.py                       # Database structure defined by python class\n│   ├── alembic.ini                     # Initialize alembic conversion from models.py\n│   │                                   \n│   ├── schema.py                       # Defines response format for database api\n│   ├── app                             # Directory containing all database api logic\n│   │   └── main.py                     # Database api logic for handling database data\n│   │\n│   └── tests                           # Directory containing all database testing\n│       ├── __init__.py                 # Initialize module\n│       ├── conftest.py                 # Runs the tests\n│       ├── test_database_add_data.py   # Test validation on database Posting\n│       └── test_database_root.py       # Checking if database is running\n│\n├── docker-compose.yml                  # Creates all docker containers\n├── nginx_config.conf                   # Config file for Nginx \n├── README.md                           # This file\n```\n\n# Useful git commands\nList new or modified files not yet commited: `git status`\n\nFetch the latest changes from origin and merge: `git pull`\n\nStages all changed files: `git add .`\n\nCommit staged files: `git commit -m \"commit message`\n\nPush local changes to Github: `git push`\n\nCreate new branch: `git checkout -b branchname`\n\nPush new branch to Github: `git push origin branchname`\n \ndelete branch locally: `git branch -d localBranchName`\n\ndelete branch remotely: `git push origin --delete remoteBranchName`\n\n# DB commands\nCreate new migration from models.py: `docker-compose run db_service alembic revision --autogenerate -m \"New Migration\"`\n\nUpdate database with new migration: `docker-compose run db_service alembic upgrade head`\n\n# PGAdmin\nLink: http://localhost:5050\n\nUsername: admin@admin.com\n\nPassword: admin\n\nCreate server manually (for now): \n\n    General:\n\n        Name: db\n\n    Connection:\n\n        Host: db\n\n        Port: 5432\n\n        Maintenance database: postgres\n\n        Username: postgres\n\n        Password: password\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadilius%2Fdigg_ml-ai_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadilius%2Fdigg_ml-ai_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadilius%2Fdigg_ml-ai_api/lists"}