Code Monkey home page Code Monkey logo

sarufi-africastalking-ussd-blueprint's Introduction

sarufi-africastalking-ussd-blueprint

A boilerplate code to easy that provides a USSD service that interfaces with the Sarufi API. It's designed to handle USSD requests, process them using the Sarufi service, and return appropriate responses.

Features

  • USSD request handling using FastAPI.
  • Integration with Sarufi for processing chat messages.
  • Environmental variable support for secure configuration.

Setup

To set up the project, follow these steps:

Prerequisites

  • Python 3.6+
  • pip (Python package manager)

Installation

  1. Clone the Repository

    git clone https://github.com/Neurotech-HQ/sarufi-africastalking-ussd-blueprint.git
    cd sarufi-africastalking-ussd-blueprint

    Install Dependencies

Use pip to install the required Python packages.

pip install -r requirements.txt

Environment Variables

Set up the necessary environment variables. Create a .env file in the root directory of the project and add the following:

SARUFI_API_KEY=your_sarufi_api_key
SARUFI_BOT_ID=your_sarufi_bot_id

Replace your_sarufi_api_key and your_sarufi_bot_id with your actual Sarufi API key and bot ID.

Running the Application

To run the application, execute:

uvicorn main:app --reload

This will start the FastAPI server on the default port 8000.

Usage

Once the server is running, it will be listening for POST requests at the /ussd endpoint. The request should contain the following form data:

text: The USSD input text. sessionId: The session ID of the USSD session. phoneNumber: The phone number of the user. serviceCode: The service code of the USSD request. The application will process this information and respond accordingly.

Contributing

Contributions to this project are welcome. Please fork the repository and submit a pull request with your changes.

License

This project is licensed under the MIT License.

sarufi-africastalking-ussd-blueprint's People

Contributors

kalebu avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.