Skip to content

Latest commit

ย 

History

History
87 lines (67 loc) ยท 3.26 KB

File metadata and controls

87 lines (67 loc) ยท 3.26 KB

Nexa API ๐ŸŒŠ

Simple, Free and Easy to use Public api

โ€ƒ
โ€ƒEndpointsโ€ƒ
โ€ƒ
โ€ƒ
โ€ƒDeploymentโ€ƒ
โ€ƒ
โ€ƒ
โ€ƒDevelopmentโ€ƒ
โ€ƒ

List of endpoints ๐ŸŽ—๏ธ

  • Search

  • Language

    • acronym - Get the meaning of an acronym
    • define - Get the definition of a word
    • translate - Translate text using google translate
  • Tools

    • password - Generates a random password according to the given length
    • color_palette - Generate color palettes from images
    • currency - Exchange rate from 'x' to 'y'. Data is scraped from x-rates
  • File server

  • Fun

    • fact - Get a random fact
    • insult - Insult somebody ( โœงโ‰– อœส–โ‰–)

Deploy it! ๐Ÿš€

This api is open source, you can deploy your own version easily ๐Ÿค—

Locally ๐Ÿ’ป,

git clone https://github.com/Itz-fork/Nexa-API
cd Nexa-API
pip3 install -r requirements.txt
bash start.sh

Heroku โ˜๏ธ

Deploy

Development ๐Ÿง‘โ€๐Ÿ’ป

Here are somethings to note,

  • You can find api wrappers in wrappers directory
  • You can find config files in config directory
  • Reusable functions are located in functions directory
  • You can find routes in routes directory
  • Use start script when running the dev server (bash start.sh dev)

Add new routes ๐Ÿ‘จโ€๐ŸŽจ

  • Create a new file in routes directory (Ex: myRoute.py)
  • Add this code (Here we add new route named /test which returns the text, Hello from Fastapi, Nexa API ๐ŸŒŠ)
from fastapi import APIRouter
from ..functions.response import send_response

route = APIRouter()

@route.get("/test")
async def test_route():
    return await send_response("Hello from Nexa API ๐ŸŒŠ")
  • Start the development server
bash start.sh dev

License & Credits ๐Ÿ‘ฎโ€โ™‚๏ธ โ™ฅ๏ธ