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 Aug 17, 2024. It is now read-only.
/H-P-G-ApiPublic archive

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

License

NotificationsYou 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

Welcome to thePromo Code Generator repository! This project features implementations of promotional code generators using two popular Python frameworks:Flask andFastAPI. 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 theHamster 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 astrain,chain,bike, orclone. To generate codes for all categories, useall.
    • 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 theLICENSE 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


[8]ページ先頭

©2009-2025 Movatter.jp