- Notifications
You must be signed in to change notification settings - Fork0
Aura is a Flask-based API that allows users to upload and retrieve random memes. Users can upload memes with a title and image (via URL or file upload). The API includes token-based authentication for secure access, ensuring that only authorized users can upload and retrieve memes.
License
yashokuu/aura-alpha
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Aura is a Flask-based API that allows users to upload and retrieve random memes. Users can upload memes with a title and image (via URL or file upload). The API includes token-based authentication for secure access, ensuring that only authorized users can upload and retrieve memes.
- Upload Memes: Upload memes using a title and image URL or file.
- Random Meme: Retrieve a random meme from the collection.
- Token-Based Authentication: Secure API access using tokens.
- Token Generation: Easily generate tokens to access the API.
Endpoint:/generate_token
Method:GET
Description: Generates a new token for accessing the API.
Response:
{"token":"your-generated-token"}
Endpoint:/api/upload?token=YOUR_TOKEN
Method:POST
Description: Upload a meme by providing a title and an image (via URL or file).
Form Data:
title
: The title of the meme.img
: The meme image URL or file.
Example:
curl -X POST -F'title=Funny Meme' -F'img=https://example.com/meme.png'"http://localhost:5000/api/upload?token=YOUR_TOKEN"
Endpoint:/api/meme?token=YOUR_TOKEN
Method:GET
Description: Retrieves a random meme in JSON format.
Response:
{"title":"Funny Meme","img":"https://example.com/meme.png"}
Clone the repository:
git clone https://github.com/siyam-yas/aura-alpha.git
Navigate to the project directory:
cd aura-meme-api
Create a virtual environment and activate it:
python -m venv venvsource venv/bin/activate# For Linux/Macvenv\Scripts\activate# For Windows
Install the required dependencies:
pip install -r requirements.txt
Run the Flask app:
python api.py
Access the app at
http://localhost:5000
.
- Flask
- Python
- JSON for data storage
This project is licensed under the MIT License - see theLICENSE file for details.
About
Aura is a Flask-based API that allows users to upload and retrieve random memes. Users can upload memes with a title and image (via URL or file upload). The API includes token-based authentication for secure access, ensuring that only authorized users can upload and retrieve memes.