a API gateway on top of Redis
Project description
APIHub
APIHub is a platform to dynamically serve API services on-fly. API service workers can be deployed when needed.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
About The Project
![Product Name Screen Shot][product-screenshot]
Here's a blank template to get started:
To avoid retyping too much info. Do a search and replace with your text editor for the following:
yifan
, apihub
, yifan2019
, email
, APIHub
, project_description
Features & TODOs
[X] Security
[X] authenticate
[X] admin, manager, user
[X] user management
[X] rate limiter
[ ] register
[ ] social login
[ ] Subscription
[-] subscription
[-] quota
[X] application token
[-] daily usage record in redis
[ ] Async/sync API calls
[ ] api worker reports input/output: describe
[X] generic worker deployment
[ ] auto scaler for api workers
Built With
Getting Started
To get a local copy up and running follow these simple steps.
Prerequisites
This is an example of how to list things you need to use the software and how to install them.
Installation
- Clone the repo
git clone https://github.com/yifan/apihub.git
- Install python packages
poetry install
Usage
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Testing
- Start postgres and redis
docker compose up
- Setup environment variables in a local .env file
cat >.env <<EOF DB_URI="postgresql://dbuser:dbpass@localhost:5432/test" JWT_SECRET="nosecret" REDIS="redis://localhost:6379/1" IN_REDIS="redis://localhost:6379/1" OUT_REDIS="redis://localhost:6379/1" SECURITY_TOKEN_EXPIRES_DAYS=1 SUBSCRIPTION_TOKEN_EXPIRES_DAYS=1 EOF
- Run tests
poetry run test
- Shutdown docker services
docker compose down
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Yifan Zhang - @yifan2019 - yzhang@hbku.edu.qa
Project Link: https://github.com/yifan/apihub
Acknowledgements
Copyright (C) 2021, Qatar Computing Research Institute, HBKU
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file apihub-0.1.0.tar.gz
.
File metadata
- Download URL: apihub-0.1.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.2 Darwin/20.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0ac4277728d24d1f516620ffa4c9ab96d7817c5333b3a68659cf1b9619d850e |
|
MD5 | 96b462bbc4804168699a2ea211f7cb99 |
|
BLAKE2b-256 | c94f536ba399862640e09d54b30d4dda0000c14160e9a95592f87757e1437422 |
File details
Details for the file apihub-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: apihub-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.2 Darwin/20.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 689cf15a1ab5d70de88c2bb2095cd3cba540ce83105adb7e043084c68aaa0747 |
|
MD5 | ee5b7320fd09564f56f1809c7430501c |
|
BLAKE2b-256 | 6dcc78be8dc4fe5be7e494187a22e9e11a21267327cf67ac83f0bf41794465e1 |