FastServer is server created in FastApi with Gateway Interface in Uvicorn and Clients in various languages available.
this shows how to create a basic server with Users information and how to handle users data and operations listed below.
- Adding - Adding user to server using
/add-user/
endpoint. - Updating - Updating user information in server using
/update-user/
endpoint. - Removing - Removing user in server using
/remove-user/
endpoint. - Retrieving - Retrieving user information in server using
/user/?id=
endpoint. - Server-Info - Retrieving server information using
/server-info/
endpoint. - Server DB Reset - Resetting whole server using
/null/
endpoint. [BETA] Risky.
- Simple and fast server using Python.
- Server with 228 requests per second.
- Persistent Database using
Json
. - Auto reloading source changes.
Server documentation is automatically generated using FastApi
.
Docs using OpenApi
Server is created in Python and to start server first install modules from requirements.txt
.
- FastApi : use
pip install fastapi
- Uvicorn : use
pip install vvicorn
Then run the server using following methods. - Using Uvicorn : use
python -m uvicorn FastServer:app --reload
- Using Python : user
python -u FastServer.py
Server started running
Clients are created in various languages like C++,Go,JavaScript... to handle basic operations on users like Adding/Updating/Removing User operations.
here are list of following clients available and for sake of simplicity every client is named to FastClient
.
- Client -
Cpp\FastClient.cpp
Contains client for FastServer. - Requirements -
Cpp\lib
folder containsHTTPRequest.hpp
for sending/posting Http Requests to server andjson.hpp
for parsing Json using JsonCpp
- Client -
csharp\FastClient.cs
Contains client for FastServer. - Requirements - install modules from
requirements.txt
listed as Newtonsoft.Json,RestSharp or use the command line. command:dotnet add package Newtonsoft.Json
- Client -
golang\FastClient.go
Contains client for FastServer. - Requirements - None just run the FastClient.go file.
- Features - Fastest client sending 200 Request/s and Adding 500 Users in 3.12 seconds
- Client -
nodejs\FastClient.js
Contains client for FastServer. - Requirements - install modules from
requirements.txt
listed as request,Faker or use the command line. command:npm install request
- Features - Fastest client sending 200 Request/s and Adding 500 Users in 3.62 seconds
- Client -
python\FastClient.py
Contains client for FastServer. - Requirements - install modules from
requirements.txt
listed as FastApi,Uvicorn,requests or use the command line. command:pip install fastapi
- Client - swift/FastClient.swift Contains client for FastServer.
- Requirements - - None. The client uses built-in Swift libraries.
- Client - rust/FastClient.rs Contains client for FastServer.
- Requirements - - Install reqwest and serde crates using the following command:
cargo install reqwest serde
- Client - java/FastClient.java Contains client for FastServer.
- Requirements - - None. The client uses built-in Java libraries.
written and maintained by Haseeb Mir (haseebmir.hm@gmail.com)