Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.
/ H-P-G-Api Public archive

A collection of promotional code generators implemented in Flask and FastAPI, featuring both basic and advanced versions.

License

Notifications You must be signed in to change notification settings

mamadceto/H-P-G-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hamster Kombat Key/Promo Generator Api

Welcome to the Promo Code Generator repository! This project features implementations of promotional code generators using two popular Python frameworks: Flask and FastAPI. It includes both basic and advanced versions of the generator to accommodate different use cases.

The promotional codes generated by this project are specifically designed for the Hamster Kombat game on Telegram. The code generators facilitate the creation of promo codes for in-game use, enabling promotional activities and user engagement for the game.

README Files

Overview

The Promo Code Generator enables you to create promotional codes for various categories of games. The project is divided into two main frameworks, each with two versions:

  • Flask: A micro web framework for Python.

    • Basic Promo: Generates a fixed number of promo codes for each category.
    • Advanced Promo: Provides customizable parameters for generating promo codes.
  • FastAPI: A modern, fast (high-performance) web framework for building APIs with Python.

    • Basic Promo: Generates a fixed number of promo codes for each category.
    • Advanced Promo: Allows for flexible API queries to customize the number of promo codes.

Features

  • Basic Promo:

    • Generates a predetermined number of promo codes for each category.
    • Simple and easy-to-use implementation.
  • Advanced Promo:

    • Allows for the customization of the number of promo codes generated.
    • Supports query parameters for filtering and adjusting the output.
    • Includes enhanced error handling and validation.

Directory Structure

/project-root
    /Flask
        /basic_promo
            /app.py
            /README.md
        /advanced_promo
            /app.py
            /README.md
    /FastApi
        /basic_promo
            /app.py
            /README.md
        /advanced_promo
            /app.py
            /README.md

Getting Started

  1. Clone the Repository:
   git clone https://github.com/mamadceto/H-P-G-Api
  1. Navigate to the Desired Framework and Version:
   cd Flask/basic_promo   # or Flask/advanced_promo
   # or
   cd FastApi/basic_promo  # or FastApi/advanced_promo
  1. Install Dependencies:
   pip install -r requirements.txt
  1. Run the Application:
   - **Flask:**
     python app.py

   - **FastAPI:**
     uvicorn app:app --reload
  1. Access the API:
   - **Flask:** http://localhost:5000/generate

   - **FastAPI:** http://localhost:8000/generate

API Usage

  • Basic Promo: Generates a fixed number of promo codes (default: 4) for each category.
  • Advanced Promo: Customize the number of promo codes and category using query parameters:
    • category (optional): Specify a category such as train, chain, bike, or clone. To generate codes for all categories, use all.
    • num (optional): Specify the number of promo codes to generate. Maximum allowed is 20.

Contributing

Feel free to fork the repository, make changes, and submit pull requests. We welcome contributions that enhance the functionality and usability of the project.

License

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

Contact

For any inquiries or feedback, please contact @mmdceto.

About

A collection of promotional code generators implemented in Flask and FastAPI, featuring both basic and advanced versions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages