Full duplex RESTful API for your asyncio web apps

Overview

TBone

logo

Build Status PyPI version Python License: MIT Waffle.io - Issues in progress Gitter chat

TBone makes it easy to develop full-duplex RESTful APIs on top of your asyncio web application or webservice. It uses a nonblocking asynchronous web server and provides the neccesary infrastructure to build asynchronous web apps and services. TBone is web-server agnostic and can be added on top of your Sanic or Aiohttp app.

TBone is comprised of 4 major modules:

  1. Data Structure - an ODM-like modeling mechanism for schema declaration, data validation and serialization
  2. Data Persistency - Persistency mixin classes for document stores with a full implementation over MongoDB
  3. Resources - Mechanism for creating full-duplex RESTful APIs over HTTP and Websockets
  4. Dispatch - Classes for managing internal and external events.

Combining the usage of these 4 modules makes it extremely easy to build full-duplex RESTful APIs on top of your MongoDB datastore.

Disclaimer

TBone is currently in Alpha stage. It may still have some bugs in the code, and some typos in the documentation. The APIs may change before an official release is made.

Example

The following example demonstrates the creation of a model schema and the corresponding RESTful resource

class Book(Model, MongoCollectionMixin):
    _id = ObjecIdField(primary_key=True)
    title = StringField(required=True)
    author = StringField(required=True)
    publication_date = DateTimeField()


class BookResource(AioHttpResource, MongoResource):
    class Meta:
        object_class = Book

Nonblocking

TBone was designed to develop asynchorous web applications and web services. The entire infrastructure was built around coroutines. TBone utilizes only asynchronous 3rd party components to make sure that your app is truly nonblocking.

Requirements

TBone uses the async/await syntax and is limited to Python version 3.5 and up.

Furthermore, TBone has some very few basic requirements. However, depending on its usage requires additional packages may be required.

Documentation

Documentation can be found here

Comments
  • Bump lodash from 4.17.4 to 4.17.19 in /examples/chatrooms/web-client

    Bump lodash from 4.17.4 to 4.17.19 in /examples/chatrooms/web-client

    Bumps lodash from 4.17.4 to 4.17.19.

    Release notes

    Sourced from lodash's releases.

    4.17.16

    Commits
    Maintainer changes

    This version was pushed to npm by mathias, a new releaser for lodash since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump lodash from 4.17.4 to 4.17.13 in /examples/chatrooms/web-client

    Bump lodash from 4.17.4 to 4.17.13 in /examples/chatrooms/web-client

    Bumps lodash from 4.17.4 to 4.17.13.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Embedded model validation fail

    Embedded model validation fail

    When creating an instance of a model subclass, which contains embedded models (at least one field is of ModelField) then validation fails when providing no data to the embedded model

    bug 
    opened by amitnabarro 0
  • Bump lodash from 4.17.4 to 4.17.21 in /examples/chatrooms/web-client

    Bump lodash from 4.17.4 to 4.17.21 in /examples/chatrooms/web-client

    Bumps lodash from 4.17.4 to 4.17.21.

    Commits
    • f299b52 Bump to v4.17.21
    • c4847eb Improve performance of toNumber, trim and trimEnd on large input strings
    • 3469357 Prevent command injection through _.template's variable option
    • ded9bc6 Bump to v4.17.20.
    • 63150ef Documentation fixes.
    • 00f0f62 test.js: Remove trailing comma.
    • 846e434 Temporarily use a custom fork of lodash-cli.
    • 5d046f3 Re-enable Travis tests on 4.17 branch.
    • aa816b3 Remove /npm-package.
    • d7fbc52 Bump to v4.17.19
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by bnjmnt4n, a new releaser for lodash since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump react-dom from 16.0.0 to 16.0.1 in /examples/chatrooms/web-client

    Bump react-dom from 16.0.0 to 16.0.1 in /examples/chatrooms/web-client

    Bumps react-dom from 16.0.0 to 16.0.1.

    Changelog

    Sourced from react-dom's changelog.

    16.0.1 (August 1, 2018)

    React DOM Server

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump axios from 0.16.2 to 0.19.0 in /examples/movies/client

    Bump axios from 0.16.2 to 0.19.0 in /examples/movies/client

    Bumps axios from 0.16.2 to 0.19.0.

    Release notes

    Sourced from axios's releases.

    v0.19.0

    Fixes and Functionality:

    • Unzip response body only for statuses != 204 (#1129) - drawski
    • Destroy stream on exceeding maxContentLength (fixes #1098) (#1485) - Gadzhi Gadzhiev
    • Makes Axios error generic to use AxiosResponse (#1738) - Suman Lama
    • Fixing Mocha tests by locking follow-redirects version to 1.5.10 (#1993) - grumblerchester
    • Allow uppercase methods in typings. (#1781) - Ken Powers
    • Fixing .eslintrc without extension (#1789) - Manoel
    • Consistent coding style (#1787) - Ali Servet Donmez
    • Fixing building url with hash mark (#1771) - Anatoly Ryabov
    • This commit fix building url with hash map (fragment identifier) when parameters are present: they must not be added after #, because client cut everything after #
    • Preserve HTTP method when following redirect (#1758) - Rikki Gibson
    • Add getUri signature to TypeScript definition. (#1736) - Alexander Trauzzi
    • Adding isAxiosError flag to errors thrown by axios (#1419) - Ayush Gupta
    • Fix failing SauceLabs tests by updating configuration - Emily Morehouse

    Documentation:

    • Add information about auth parameter to README (#2166) - xlaguna
    • Add DELETE to list of methods that allow data as a config option (#2169) - Daniela Borges Matos de Carvalho
    • Update ECOSYSTEM.md - Add Axios Endpoints (#2176) - Renan
    • Add r2curl in ECOSYSTEM (#2141) - 유용우 / CX
    • Update README.md - Add instructions for installing with yarn (#2036) - Victor Hermes
    • Fixing spacing for README.md (#2066) - Josh McCarty
    • Update README.md. - Change .then to .finally in example code (#2090) - Omar Cai
    • Clarify what values responseType can have in Node (#2121) - Tyler Breisacher
    • docs(ECOSYSTEM): add axios-api-versioning (#2020) - Weffe
    • It seems that responseType: 'blob' doesn't actually work in Node (when I tried using it, response.data was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser
    • Add issue templates - Emily Morehouse
    • Update README.md. - Add Querystring library note (#1896) - Dmitriy Eroshenko
    • Add react-hooks-axios to Libraries section of ECOSYSTEM.md (#1925) - Cody Chan
    • Clarify in README that default timeout is 0 (no timeout) (#1750) - Ben Standefer

    v0.19.0-beta.1

    NOTE: This is a beta version of this release. There may be functionality that is broken in certain browsers, though we suspect that builds are hanging and not erroring. See https://saucelabs.com/u/axios for the most up-to-date information.

    New Functionality:

    • Add getUri method (#1712)
    • Add support for no_proxy env variable (#1693)
    • Add toJSON to decorated Axios errors to faciliate serialization (#1625)
    • Add second then on axios call (#1623)
    • Typings: allow custom return types
    • Add option to specify character set in responses (with http adapter)

    Fixes:

    ... (truncated)
    Changelog

    Sourced from axios's changelog.

    0.19.0 (May 30, 2019)

    Fixes and Functionality:

    • Unzip response body only for statuses != 204 (#1129) - drawski
    • Destroy stream on exceeding maxContentLength (fixes #1098) (#1485) - Gadzhi Gadzhiev
    • Makes Axios error generic to use AxiosResponse (#1738) - Suman Lama
    • Fixing Mocha tests by locking follow-redirects version to 1.5.10 (#1993) - grumblerchester
    • Allow uppercase methods in typings. (#1781) - Ken Powers
    • Fixing building url with hash mark (#1771) - Anatoly Ryabov
    • This commit fix building url with hash map (fragment identifier) when parameters are present: they must not be added after #, because client cut everything after #
    • Preserve HTTP method when following redirect (#1758) - Rikki Gibson
    • Add getUri signature to TypeScript definition. (#1736) - Alexander Trauzzi
    • Adding isAxiosError flag to errors thrown by axios (#1419) - Ayush Gupta

    Internal:

    • Fixing .eslintrc without extension (#1789) - Manoel
    • Fix failing SauceLabs tests by updating configuration - Emily Morehouse
    • Add issue templates - Emily Morehouse

    Documentation:

    • Consistent coding style in README (#1787) - Ali Servet Donmez
    • Add information about auth parameter to README (#2166) - xlaguna
    • Add DELETE to list of methods that allow data as a config option (#2169) - Daniela Borges Matos de Carvalho
    • Update ECOSYSTEM.md - Add Axios Endpoints (#2176) - Renan
    • Add r2curl in ECOSYSTEM (#2141) - 유용우 / CX
    • Update README.md - Add instructions for installing with yarn (#2036) - Victor Hermes
    • Fixing spacing for README.md (#2066) - Josh McCarty
    • Update README.md. - Change .then to .finally in example code (#2090) - Omar Cai
    • Clarify what values responseType can have in Node (#2121) - Tyler Breisacher
    • docs(ECOSYSTEM): add axios-api-versioning (#2020) - Weffe
    • It seems that responseType: 'blob' doesn't actually work in Node (when I tried using it, response.data was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser
    • Update README.md. - Add Querystring library note (#1896) - Dmitriy Eroshenko
    • Add react-hooks-axios to Libraries section of ECOSYSTEM.md (#1925) - Cody Chan
    • Clarify in README that default timeout is 0 (no timeout) (#1750) - Ben Standefer

    0.19.0-beta.1 (Aug 9, 2018)

    NOTE: This is a beta version of this release. There may be functionality that is broken in certain browsers, though we suspect that builds are hanging and not erroring. See https://saucelabs.com/u/axios for the most up-to-date information.

    New Functionality:

    • Add getUri method (#1712)
    • Add support for no_proxy env variable (#1693)
    • Add toJSON to decorated Axios errors to faciliate serialization (#1625)
    • Add second then on axios call (#1623)
    ... (truncated)
    Commits
    • 8d0b92b Releasing 0.19.0
    • 3f7451c Update Changelog for release (0.19.0)
    • f28ff93 Add information about auth parameter to README (#2166)
    • 5250e6e Add DELETE to list of methods that allow data as a config option (#2169)
    • 6b0ccd1 Update ECOSYSTEM.md - Add Axios Endpoints (#2176)
    • 299e827 Add r2curl in ECOSYSTEM (#2141)
    • fd0c959 Unzip response body only for statuses != 204 (#1129)
    • 92d2313 Update README.md - Add instructions for installing with yarn (#2036)
    • ddcc2e4 Fixing spacing for README.md (#2066)
    • 48c43d5 Update README.md. - Change .then to .finally in example code (#2090)
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by emilyemorehouse, a new releaser for axios since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • API schema support

    API schema support

    Add automatic schema declaration for ModelResource based on model's serialisation rules. This is useful for clients who wish to declare their models and collections dynamically based on fields serialized in the resource

    enhancement in progress 
    opened by amitnabarro 0
Owner
TBone Framework
A Python web framework for building real-time applications and full-duplex RESTFul APIs
TBone Framework
Restful API framework wrapped around MongoEngine

Flask-MongoRest A Restful API framework wrapped around MongoEngine. Setup from flask import Flask from flask_mongoengine import MongoEngine from flask

Close 505 Feb 11, 2021
Flask-Potion is a RESTful API framework for Flask and SQLAlchemy, Peewee or MongoEngine

Flask-Potion Description Flask-Potion is a powerful Flask extension for building RESTful JSON APIs. Potion features include validation, model resource

DTU Biosustain 484 Feb 3, 2021
An abstract and extensible framework in python for building client SDKs and CLI tools for a RESTful API.

django-rest-client An abstract and extensible framework in python for building client SDKs and CLI tools for a RESTful API. Suitable for APIs made wit

Certego 4 Aug 25, 2022
A micro web-framework using asyncio coroutines and chained middleware.

Growler master ' dev Growler is a web framework built atop asyncio, the asynchronous library described in PEP 3156 and added to the standard library i

null 687 Nov 27, 2022
Python AsyncIO data API to manage billions of resources

Introduction Please read the detailed docs This is the working project of the next generation Guillotina server based on asyncio. Dependencies Python

Plone Foundation 183 Nov 15, 2022
NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models.

NO LONGER MAINTAINED This repository is no longer maintained due to lack of time. You might check out the fork https://github.com/mrevutskyi/flask-res

null 1k Jan 4, 2023
NO LONGER MAINTAINED - A Flask extension for creating simple ReSTful JSON APIs from SQLAlchemy models.

NO LONGER MAINTAINED This repository is no longer maintained due to lack of time. You might check out the fork https://github.com/mrevutskyi/flask-res

null 1k Jan 15, 2021
Free and open source full-stack enterprise framework for agile development of secure database-driven web-based applications, written and programmable in Python.

Readme web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applic

null 2k Dec 31, 2022
Asynchronous HTTP client/server framework for asyncio and Python

Async http client/server framework Key Features Supports both client and server side of HTTP protocol. Supports both client and server Web-Sockets out

aio-libs 13.2k Jan 5, 2023
WebSocket and WAMP in Python for Twisted and asyncio

Autobahn|Python WebSocket & WAMP for Python on Twisted and asyncio. Quick Links: Source Code - Documentation - WebSocket Examples - WAMP Examples Comm

Crossbar.io 2.4k Jan 6, 2023
A very simple asynchronous wrapper that allows you to get access to the Oracle database in asyncio programs.

cx_Oracle_async A very simple asynchronous wrapper that allows you to get access to the Oracle database in asyncio programs. Easy to use , buy may not

null 36 Dec 21, 2022
web.py is a web framework for python that is as simple as it is powerful.

web.py is a web framework for Python that is as simple as it is powerful. Visit http://webpy.org/ for more information. The latest stable release 0.62

null 5.8k Dec 30, 2022
APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects

APIFlask APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects. It's easy to use, highly customizable, ORM/O

Grey Li 705 Jan 4, 2023
A public API written in Python using the Flask web framework to determine the direction of a road sign using AI

python-public-API This repository is a public API for solving the problem of the final of the AIIJC competition. The task is to create an AI for the c

Lev 1 Nov 8, 2021
Distribution Analyser is a Web App that allows you to interactively explore continuous distributions from SciPy and fit distribution(s) to your data.

Distribution Analyser Distribution Analyser is a Web App that allows you to interactively explore continuous distributions from SciPy and fit distribu

Robert Dzudzar 46 Nov 8, 2022
🔥 Fire up your API with this flamethrower

?? Fire up your API. Documentation: https://flama.perdy.io Flama Flama aims to bring a layer on top of Starlette to provide an easy to learn and fast

José Antonio Perdiguero 216 Dec 26, 2022
Async Python 3.6+ web server/framework | Build fast. Run fast.

Sanic | Build fast. Run fast. Build Docs Package Support Stats Sanic is a Python 3.6+ web server and web framework that's written to go fast. It allow

Sanic Community Organization 16.7k Jan 8, 2023
Fast, asynchronous and elegant Python web framework.

Warning: This project is being completely re-written. If you're curious about the progress, reach me on Slack. Vibora is a fast, asynchronous and eleg

vibora.io 5.7k Jan 8, 2023
cirrina is an opinionated asynchronous web framework based on aiohttp

cirrina cirrina is an opinionated asynchronous web framework based on aiohttp. Features: HTTP Server Websocket Server JSON RPC Server Shared sessions

André Roth 32 Mar 5, 2022