Skip to main content

Modular backend SDK for building Super Apps

Project description

SliceHub-Library

SliceHub is a modular backend SDK for building Super Apps consisting of independent "slices" plugged into a central hub. This repository contains the core library (v0.1.0) along with an example slice and usage.

Features

  • FastAPI-based core application
  • JWT authentication stub
  • Role-based access hooks (planned)
  • Modular slice registration system
  • SQLAlchemy/PostgreSQL abstraction layer
  • Optional Firebase adapter (future)
  • WebSocket real-time support
  • Extensible slice architecture

Quick start

pip install slicehub

Example application (example_main.py):

from slicehub import SliceHub
from slicehub.services.ride import RideSlice

hub = SliceHub()
hub.enable_auth(secret_key="...")
hub.enable_database(url="postgresql://...")
hub.register_slice(RideSlice())
app = hub.get_app()

Run with Uvicorn:

uvicorn example_main:app --reload

Publishing to PyPI

  1. Prepare metadata – update pyproject.toml version and author info.
  2. Install build tools:
    pip install --upgrade build twine
    
  3. Build distributions:
    python -m build
    
    This produces dist/slicehub-0.1.0.tar.gz and dist/slicehub-0.1.0-py3-none-any.whl.
  4. Upload to PyPI (use Test PyPI first if desired):
    twine upload dist/*
    # or for test PyPI:
    twine upload --repository testpypi dist/*
    
  5. Tag & push your Git repository:
    git tag v0.1.0
    git push origin --tags
    

You may create a ~/.pypirc file with your credentials to avoid entering them repeatedly.

Next steps

Continue building out auth, database, real-time, and slice templates. Contributions welcome!

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

slicehub-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slicehub-0.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file slicehub-0.1.0.tar.gz.

File metadata

  • Download URL: slicehub-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for slicehub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a287fa8a3632973b1c02d5c4af153bfb0b735332c0338f9e3b1b4bb34f013b70
MD5 9394403db08eaca1f2e321a8af4d231a
BLAKE2b-256 295eb8b17869b08d5db9e6a05bd1aac3092f2c5dcb7dbd266650502d7143fc46

See more details on using hashes here.

File details

Details for the file slicehub-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: slicehub-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for slicehub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb0b9f75a675e4d16bdc7b49aedebb26acd1bae14dd21f0059507a9913a85e8b
MD5 fb077a067df0d389439c148fb629f12f
BLAKE2b-256 8424313f01aa7f509985857a74bec64a07caf3a58228e6aa85ea021c46175f8e

See more details on using hashes here.

Supported by

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