Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
/aura-alphaPublic archive

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

NotificationsYou must be signed in to change notification settings

yashokuu/aura-alpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

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.

Features

  • 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.

Endpoints

1. Generate Token

Endpoint:/generate_token
Method:GET
Description: Generates a new token for accessing the API.

Response:

{"token":"your-generated-token"}

2. Upload Meme

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"

3. Get Random Meme

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"}

How to Run the Project

  1. Clone the repository:

    git clone https://github.com/siyam-yas/aura-alpha.git
  2. Navigate to the project directory:

    cd aura-meme-api
  3. Create a virtual environment and activate it:

    python -m venv venvsource venv/bin/activate# For Linux/Macvenv\Scripts\activate# For Windows
  4. Install the required dependencies:

    pip install -r requirements.txt
  5. Run the Flask app:

    python api.py
  6. Access the app athttp://localhost:5000.

Technologies Used

  • Flask
  • Python
  • JSON for data storage

License

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp