Planetary API is a simple RESTful API built using Flask and SQLAlchemy for managing information about planets and users.
-
User Management: Allows registration and login functionalities for users.
-
Planet Information: Provides CRUD operations for managing planetary data such as planet name, type, and attributes.
-
Authentication: Utilizes JWT (JSON Web Tokens) for secure authentication of users.
git clone https://github.com/yugannkt/REST_API.git
MAIL_USERNAME: Your SMTP username for sending emails.
MAIL_PASSWORD: Your SMTP password for sending emails.
flask db_create
flask db_seed
flask run
The API will be accessible at http://localhost:5000.
GET /planets: Retrieve a list of all planets.
POST /register: Register a new user.
POST /login: Authenticate a user and generate an access token.
GET /retrieve_password/: Retrieve password for a user via email.
GET /planet_details/<planet_id>: Retrieve details of a specific planet.
POST /add_planet: Add a new planet (requires authentication).
PUT /update_planet: Update details of an existing planet (requires authentication).
DELETE /remove_planet/<planet_id>: Delete a planet (requires authentication).