Skip to content

qcri/apihub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

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


Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements
images:: https://github.com/yifan/apihub/actions/workflows/pytest-redis-postgres-workflow.yml/badge.svg

About The Project

[Product Name Screen Shot][product-screenshot]

Features & TODOs

Security

authenticate

admin, manager, user

user management

rate limiter

register

social login

Subscription

subscription

application token

daily usage record in redis

Async/sync API calls

api worker reports input/output: describe

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

  1. Clone the repo

    git clone https://github.com/yifan/apihub.git
  2. 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 theDocumentation

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.

  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

Testing

  1. Start postgres and redis

    docker compose up
  2. 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
  3. Run tests

    poetry run test
  4. Shutdown docker services

    docker compose down

License

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

Contact

Yifan Zhang - [@yifan2019](https://twitter.com/yifan2019) - [email protected]

Project Link: https://github.com/yifan/apihub

Acknowledgements

Copyright (C) 2021, Qatar Computing Research Institute, HBKU