Code Monkey home page Code Monkey logo

math-cli-api-kit's Introduction

Math CLI API Kit

GitHub License GitHub Issues GitHub Stars GitHub Forks

The Math CLI API Kit is a Python package and command-line tool for performing algebraic and geometric operations. It provides a set of mathematical functions and exposes them through both a command-line interface and a RESTful API.

Math CLI API Kit Swagger UI

Table of Contents

Installation

The Math CLI API Kit can be installed directly from GitHub using pip:

pip install git+https://github.com/gasparyanvazgen/math-cli-api-kit.git

Ensure that a virtual environment is created before installing to manage your project's dependencies.

Usage

Command-Line Interface

The Math CLI API Kit offers a range of algebraic and geometric commands via the command-line interface. Operations such as addition, subtraction, multiplication, and more are supported.

Here are some examples:

python -m math_cli_api_kit.cli algebra sum -x 5 -y 3
python -m math_cli_api_kit.cli geometry surface_of_square -a 4

Additional details on the available commands and their usage can be found by running:

python -m math_cli_api_kit.cli --help

API

The Math CLI API Kit provides a RESTful API for programmatic access to mathematical operations. To run the API server, use the following script:

# server.py

from math_cli_api_kit.api import create_app

app = create_app(__name__)

if __name__ == "__main__":
    app.run(host="localhost", port=8000)

The server can be started with the following command:

sanic server:app

Alternatively, the server can be run using plain Python:

python server.py

This action launches the server, making it accessible at http://localhost:8000/. API endpoints provided by the Math CLI API Kit can be accessed through this server. If there's a need to change the port when running the server, you can use the following command:

sanic server:app --port=8005

However, when running it using python server.py, the server operates on port 8005, as specified in the code given in server.py:

# the rest of the code

if __name__ == "__main__":
    app.run(host="localhost", port=8005)

You can access the Swagger UI for the API at http://localhost:8005/swagger/

API Documentation

For detailed documentation of the API endpoints, please consult the official OpenAPI documentation.

Contributing

Contributions to the Math CLI API Kit are welcome. To contribute or report an issue, please refer to the contributing guidelines.

License

The Math CLI API Kit is an open-source project released under the MIT License. For more details, please review the LICENSE.


For inquiries or assistance, please feel free to contact the project owner, Vazgen Gasparyan, at [email protected].

Thank you for using the Math CLI API Kit!

math-cli-api-kit's People

Stargazers

 avatar

Watchers

 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.