{"id":24806413,"url":"https://github.com/remy349/volcanoes-restapi-python","last_synced_at":"2026-05-04T06:34:20.152Z","repository":{"id":118336328,"uuid":"540938654","full_name":"Remy349/volcanoes-restapi-python","owner":"Remy349","description":"A simple REST API about volcanoes.","archived":false,"fork":false,"pushed_at":"2023-08-11T01:58:51.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T08:31:41.698Z","etag":null,"topics":["flask","flask-migrate","flask-smorest","flask-sqlalchemy","pytest","python","rest-api","swagger-ui"],"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/Remy349.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":"2022-09-24T19:07:03.000Z","updated_at":"2023-08-09T19:54:02.000Z","dependencies_parsed_at":"2023-07-30T00:26:54.680Z","dependency_job_id":"bfa8c993-f2a5-4112-a4e3-81eb4c3fe8d3","html_url":"https://github.com/Remy349/volcanoes-restapi-python","commit_stats":null,"previous_names":["remy349/volcanoes-restapi-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Remy349%2Fvolcanoes-restapi-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Remy349%2Fvolcanoes-restapi-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Remy349%2Fvolcanoes-restapi-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Remy349%2Fvolcanoes-restapi-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Remy349","download_url":"https://codeload.github.com/Remy349/volcanoes-restapi-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245431905,"owners_count":20614225,"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":["flask","flask-migrate","flask-smorest","flask-sqlalchemy","pytest","python","rest-api","swagger-ui"],"created_at":"2025-01-30T08:28:29.118Z","updated_at":"2026-05-04T06:34:20.107Z","avatar_url":"https://github.com/Remy349.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# volcanoes-restapi-python\n\nSimple REST API about volcanoes. You can get some information about volcanoes by entering data such as name, last eruption date, height and status.\n\nThe REST API was developed using Python, Flask, Flask-SQLALchemy, Flask-Migrate, and Flask-Smorest. Flask-Smorest helped me to better develop the REST API and to integrate Swagger UI.\n\n## Table of Contents\n\n- [Preview image](#preview-image)\n- [REST API routes](#rest-api-routes)\n- [How to use the REST API?.](#how-to-use-the-rest-api)\n- [Database migrations](#database-migrations)\n\n## Preview image\n\n![PREVIEW](./preview/preview.png)\n\n## REST API routes\n\n| HTTP Method | Resource URL                | Notes                           |\n| ----------- | --------------------------- | ------------------------------- |\n| `GET`       | `/api/volcano`              | Obtain a list of all volcanoes. |\n| `GET`       | `/api/volcano/{volcano_id}` | Obtain a single record.         |\n| `POST`      | `/api/volcano`              | Add a new record.               |\n| `PUT`       | `/api/volcano/{volcano_id}` | Update a record.                |\n| `DELETE`    | `/api/volcano/{volcano_id}` | Delete a record.                |\n\n## How to use the REST API?\n\n1. Clone the repository on your computer:\n\n```shell\n$ git clone https://github.com/Remy349/volcanoes-restapi-python.git\n\n$ cd volcanoes-restapi-python/\n```\n\n2. Create a virtual environment using Python and install dependencies:\n\n  - If you have Pipenv you can do it in the following way:\n```shell\n$ pipenv shell\n\n$ pipenv install -r requirements.txt\n```\n\n  - If you do not have Pipenv you can do it this way. These are for Linux/macOS, on Windows they might be a little different:\n```shell\n$ python3 -m venv venv\n\n$ . venv/bin/activate\n\n$ pip install -r requirements.txt\n```\n\n3. Run the REST API and go to http://localhost:5000/swagger-ui:\n\n```shell\n$ flask run\n* Serving Flask app 'application.py'\n * Debug mode: on\nWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.\n * Running on http://127.0.0.1:5000\nPress CTRL+C to quit\n * Restarting with stat\n * Debugger is active!\n * Debugger PIN: 168-842-935\n```\n\n## Database migrations\n\nThe project has a database made on SQLite called *data.db*, where all the records will be stored.\n\nIf you want to delete it and create it again, execute the following commands provided by Flask-Migrate for handling database migrations. Always with your virtual environment active:\n\n```shell\n$ flask db upgrade\n```\n\n**NOTE**: If you delete the migrations folder you will have to create it again, create the migration and add the changes. This whole process can be done in the following way:\n\n```shell\n# Creates the folder for migrations.\n$ flask db init\n\n# Create the migration. This must be done every time you update or add a model.\n$ flask db migrate\n\n# Add the changes.\n$ flask db upgrade\n```\n\n### Developed by Santiago de Jesús Moraga Caldera - Remy349(GitHub)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremy349%2Fvolcanoes-restapi-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremy349%2Fvolcanoes-restapi-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremy349%2Fvolcanoes-restapi-python/lists"}