Skip to content

A simple RESTful API built for managing brand names using RediSearch.

License

Notifications You must be signed in to change notification settings

Hi-dlwlrma/redisearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redisearch

A simple Flask-based RESTful API for managing brand names using Redisearch.

Getting Started

Prerequisites

  • Python 3.x
  • Redis with Redisearch module installed

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/brand-name-api.git
cd brand-name-api
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Ensure Redis is running and has the Redisearch module enabled.

Running the Application Start the Flask application:

python app.py

The API will be available at http://127.0.0.1:5000.

API Endpoints

  • POST /brands: Add a new brand.
  • DELETE /brands/: Delete a brand by ID.
  • PUT /brands/: Update a brand's name by ID.
  • GET /brands/search?q=: Search for brands by name.

Example Requests

  • Add a Brand:
curl -X POST http://127.0.0.1:5000/brands -H "Content-Type: application/json" -d '{"id": "1", "name": "Nike"}'
  • Search for Brands:
curl -X GET "http://127.0.0.1:5000/brands/search?q=Nike"

License This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple RESTful API built for managing brand names using RediSearch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published