{"id":14975901,"url":"https://github.com/chidioguejiofor/airtech-api","last_synced_at":"2025-10-17T14:01:45.143Z","repository":{"id":34577835,"uuid":"177195206","full_name":"chidioguejiofor/airtech-api","owner":"chidioguejiofor","description":"A dockerised Air reservation api built with django and django rest framework","archived":false,"fork":false,"pushed_at":"2022-12-08T09:31:11.000Z","size":4045,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"staging","last_synced_at":"2025-02-10T02:35:26.218Z","etag":null,"topics":["celery","celerybeat","circleci","codeclimate","codeclimate-coverage","django","django-rest-framework","docker","dockercompose","githook","heroku-deployment","pipenv","postman-collection","pytest","python","python3","yapf"],"latest_commit_sha":null,"homepage":"https://airtech-api.herokuapp.com/api/v1","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/chidioguejiofor.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}},"created_at":"2019-03-22T19:02:59.000Z","updated_at":"2020-06-06T06:32:15.000Z","dependencies_parsed_at":"2022-08-27T20:10:41.100Z","dependency_job_id":null,"html_url":"https://github.com/chidioguejiofor/airtech-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chidioguejiofor%2Fairtech-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chidioguejiofor%2Fairtech-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chidioguejiofor%2Fairtech-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chidioguejiofor%2Fairtech-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chidioguejiofor","download_url":"https://codeload.github.com/chidioguejiofor/airtech-api/tar.gz/refs/heads/staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217220,"owners_count":20903009,"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":["celery","celerybeat","circleci","codeclimate","codeclimate-coverage","django","django-rest-framework","docker","dockercompose","githook","heroku-deployment","pipenv","postman-collection","pytest","python","python3","yapf"],"created_at":"2024-09-24T13:52:50.091Z","updated_at":"2025-10-17T14:01:44.867Z","avatar_url":"https://github.com/chidioguejiofor.png","language":"Python","readme":"[![CircleCI](https://circleci.com/gh/chidioguejiofor/airtech-api.svg?style=svg)](https://circleci.com/gh/chidioguejiofor/airtech-api) [![Test Coverage](https://api.codeclimate.com/v1/badges/5c9be06a382901592e89/test_coverage)](https://codeclimate.com/github/chidioguejiofor/airtech-api/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/5c9be06a382901592e89/maintainability)](https://codeclimate.com/github/chidioguejiofor/airtech-api/maintainability)\n\n# Airtech API\nhas had their challenges using spreadsheets to manage their flight booking system. They are ready to automate their processes with an application and have reached out to you to build a flight booking application for the company.\n\n## Setup App\nRun the following commands:\n\n- Clone repo via git clone `https://github.com/chidioguejiofor/airtech-api.git`\n- Start virtual environment via `pipenv shell`\n- Install dependencies via `pipenv install`\n- Make bash scripts executable via: ` chmod +x hooks/install_hooks.sh hooks/pre_commit.sh`\n- Install hooks by running: `hooks/install_hooks.sh`\n- Use the `.env-sample` file to create a `.env` file with required environmental variables\n\n## Linting Automation\nThe app is configured to automatically lint your files once you do a `git commit`. However you can decide to lint all \npython files by running `yapf -ir $(find . -name '*.py')`. \nLinting follows the [PE8 Style Guide](https://www.python.org/dev/peps/pep-0008/)\n\n\n## Starting the app\nIn order to start the app locally, run `python manage.py runserver`. \n\n## Documentation\nYou can all the endpoints in the postman documentation  here [![Open Docs](https://run.pstmn.io/button.svg)](https://documenter.getpostman.com/view/4208573/SVSHrppk)\n\n## Starting Redis and Celery\nCelery is used as the message broker for the API. We use it to run heavy task(via celery-workers) and run cronjobs(via celery-beat).\n\n#### Starting Redis\nIn order to run celery, you would need to ensure that a `redis` is running. \nUsing docker, you can achieve this by running `docker run -p 6379:6379 redis`. This would spin up a redis server in  port `6379` in your machine.\n\nIf your `redis server` is running on a different port/host, you must specify the URL in the `.env` file via key `REDIS_SERVER_URL`\n\n#### Starting Redis\nOnce Redis is up and running, you can now spin up celery in these steps:\n\n- Start celery worker by executing  `celery -A celery_config.celery_app worker --loglevel=info`\n- In a separate terminal, spin up the celery beat via `celery -A celery_config.celery_schedules beat --loglevel=info`\n\n## Docker Setup\nYou could also easily start the API, Celery and Redis by using docker in the following steps:\n\n1. Download and Install Docker from [Docker Getting Started Page](https://www.docker.com/get-started)\n2. Ensure that Docker is installed by running `docker --version`. This should display the version of docker on your machine\n3. In Project directory, use _docker-compose_ to build the app  by running  `docker-compose build`.\n4. Start the app via `docker-compose up`. You could add the `-d`(`docker-compose -d`) if you don't want to see the logs of the app.\n5. Run` docker ps` to see that the airtech app is running\n6. You should be able to connect to the app via the `localhost`\n\nWhen you are done running your app with docker, it is best to free up resources that is used. To do this follow these steps:\n\n1. Make the *free_up_memory.sh* bash script executable by running `chmod +x scripts/free_up_memory.sh`\n2. Execute the script via: `scripts/free_up_memory.sh`\n\nThe above would free up memory that is used in your docker instance\n\n## Running Tests\nYou can run tests for the app via: `pytest --cov=airtech_api --cov-report=html`\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchidioguejiofor%2Fairtech-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchidioguejiofor%2Fairtech-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchidioguejiofor%2Fairtech-api/lists"}