Skip to main content

Programming Language to make API [Utilise the power of all languages in you API]

Project description


April

A Programming Language to make API's !!

Explore the docs »

Report Bug . Request Feature

Contributors Forks Stargazers Issues License

Table Of Contents

About The Project

Screen Shot

This language was made for making API's great ease and more efficiency.

The language connects each API endpoint to a specific program/command, in case you want to write the code for the endpoint '/home' in python and '/generate' in Cpp - this can be done.

The language have packages for multiple languages for adapting april to the wanted language (some packages are made by the community too!!) . In case you dont find the required package for utilizing april in your wanted language - don't worry its easy to make a package for your own.

Built With

  • Written in python3
  • Makes use of FASTAPI

Features

  • Easy install
  • Simple
  • Efficient
  • Inbuild ratelimiting features (if req)
  • Auto-Generated API Docs (if req)
  • Banned IPs
  • Disallow Private IPs (if req)
  • Cross platform

Getting Started

Prerequisites

  • Python3
  • Pip3
  • Redis server

Installation

WIndows :

pip install aprillang

Linux / MacOs:

pip3 install aprillang

Usage

Get the list of allowed commands

april -h

Get info of the language

april -a

Compile an .apl file (april file):

  • This converts the april code to python3 code
  • Compiled file is saved as filename without extention apl + '_apl.py'
april -c file.apl

Run an .apl file (start the API server):

  • Format for the command is - april -r host:port
april -r file.apl 0.0.0.0:8080

Get the version of april:

april -v

Packages

Language Link Creator Info
Python Link merwin-asm Link
Lua Link merwin-asm Link
JS Link axorax Link
TS Link merwin-asm Link
Go Link merwin-asm Link
Rust Link merwin-asm Link
PHP Link merwin-asm Link
Dart Link merwin-asm Link
Ruby Link merwin-asm Link

About making a package yourself

  • The packages are used to connect the april program and the program dedicated to the endpoint.
  • When the program pointed to the endpoint is called the program is suplied with a call ID in the form of commandline argument (last argument). The program can access details related to the request in the json file "." + call ID + ".input". And the output of the program can be put in to the json file "." + call ID + ".output".

About the input and output files

Input File :

  • Json file
  • Filename : "." + call ID + ".input"
  • Contains information about the request ,
    {
    "request" : dict containing info of the request,
    "input" : {"varible_name_in_the_url" : "value", ....}
    }
    

Output File :

  • Json file
  • Filename : "." + call ID + ".output"
  • Should contain information about the response ,
{
"headers" : <headers for the response>,
"status" : <status code>,
"output" : "the data to be send out to the user"
}
  • The output and input files automatically gets deleted when the data in the output file is gained.

Support

For support, join our discord server https://discord.gg/PXMSPJXhXd

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.
  • Please also read through the Code Of Conduct before posting your first idea as well.

Creating A Pull Request

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Authors

  • Merwin - Comp Sci Student - Merwin - Main programmer

Contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aprillang-1.0.1.tar.gz (5.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page