Skip to main content

No project description provided

Project description

Iotcore - Python MQTT Broker and IoT Features for Django and FastAPI.

The project aims to give full support for mqtt broker and related apis. The internals of the mqtt server is written in
Rust using popular Tokio framework. Motive of the project is to avoid the GIL limitation of python and bring all the fun features offered by rust.

Features

  • Full-fledged configurable Tokio based MQTT server
  • No python GIL limitation
  • All Standard MQTT broker features
  • Zero extra setup required to run mqtt broker in you Django and Fastapi project
  • and more

Planned Features

  • Device support
  • Sensor support
  • Sensor data storage
  • Django based admin pages
  • Django rest framework based APIs for managing devices and sensors
  • SSL certificates and policy management

Installation

PyPI

pip install iotcore

Create a new file called mqtt.toml in your root project directory and copy pase the sample mqtt.toml from https://github.com/tomvictor/iotcore

FastAPI setup

from fastapi import FastAPI
from contextlib import asynccontextmanager
from iotcore import start_mqtt_server


@asynccontextmanager
async def lifespan(app: FastAPI):
    start_mqtt_server()
    yield


app = FastAPI(lifespan=lifespan)


@app.get("/")
def read_root():
    return {"Hello": "World"}

Django Setup

Then add iotcore to the django apps as below in the settings.py file of your project

INSTALLED_APPS = [
    "Other Apps here",
    "iotcore.djangoiot"
]

Now Connect to mqtt broker on localhost
MQTT Port : 1883

Run Example project

pip install django
pip install iotcore

python examples/django/manage.py runserver

For more details check the example folder

Contribute

  • Issue Tracker: github.com/tomvictor/iotcore/issues
  • Source Code: github.com/tomvictor/iotcore

Support

Star the project on GitHub :)

License

The project is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iotcore-0.0.12.tar.gz (24.8 kB view hashes)

Uploaded Source

Built Distributions

iotcore-0.0.12-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

iotcore-0.0.12-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

iotcore-0.0.12-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

iotcore-0.0.12-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

iotcore-0.0.12-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

iotcore-0.0.12-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-pp37-pypy37_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

iotcore-0.0.12-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

iotcore-0.0.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.12+ i686

iotcore-0.0.12-cp311-none-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

iotcore-0.0.12-cp311-none-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.11 Windows x86

iotcore-0.0.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.0 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARMv7l

iotcore-0.0.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.12+ i686

iotcore-0.0.12-cp311-cp311-macosx_11_0_arm64.whl (3.6 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

iotcore-0.0.12-cp311-cp311-macosx_10_7_x86_64.whl (3.8 MB view hashes)

Uploaded CPython 3.11 macOS 10.7+ x86-64

iotcore-0.0.12-cp310-none-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

iotcore-0.0.12-cp310-none-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.10 Windows x86

iotcore-0.0.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

iotcore-0.0.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686

iotcore-0.0.12-cp310-cp310-macosx_11_0_arm64.whl (3.6 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

iotcore-0.0.12-cp310-cp310-macosx_10_7_x86_64.whl (3.8 MB view hashes)

Uploaded CPython 3.10 macOS 10.7+ x86-64

iotcore-0.0.12-cp39-none-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

iotcore-0.0.12-cp39-none-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.9 Windows x86

iotcore-0.0.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARMv7l

iotcore-0.0.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

iotcore-0.0.12-cp38-none-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

iotcore-0.0.12-cp38-none-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.8 Windows x86

iotcore-0.0.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARMv7l

iotcore-0.0.12-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

iotcore-0.0.12-cp37-none-win_amd64.whl (3.1 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

iotcore-0.0.12-cp37-none-win32.whl (2.9 MB view hashes)

Uploaded CPython 3.7 Windows x86

iotcore-0.0.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

iotcore-0.0.12-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (5.0 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARMv7l

iotcore-0.0.12-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.3 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

iotcore-0.0.12-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (5.6 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page