Skip to main content

Helping you use websockets in an effective way in views

Project description

Welcome to Sockpuppet 👋

🎉 You just discovered an exciting new way to build modern, reactive, real-time apps with Django.

It's a way to avoid fiddling with apis on the backend and then using single page applications on the frontend. Sockpuppet does all the heavylifting for you.

This is the django implementation of the excellent rails library stimulus-reflex, which in turn is inspired by Phoenix LiveView.

📚 Documentation

We share the documentation with the excellent stimulusreflex. For the time being the documentation can be found in this PR

⚡️ Get started

# not yet on pypi
pip install django-sockpuppet

# Add these into INSTALLED_APPS in settings.py
INSTALLED_APPS = [
    'channels',
    'sockpuppet'
]

# generates scaffolding for webpack.config.js and installs required js dependencies
# if you prefer to do that manually read the more thorough documentation
python manage.py initial_sockpuppet

# scaffolds a new reflex with everything that's needed.
python manage.py generate_reflex app_name name_of_reflex

You're almost there, read about how to tie it all together in the quickstart documentation

💙 Community

  • Discourse - long form async communication
  • Discord - We share the discord together with stimulus-reflex, and there is a channel dedicated for python/django discussions.

🛠 Test things using this repo

git clone git@github.com:jonathan-s/django-sockpuppet.git
npm install
npm run build_test
python manage.py runserver
# visit https://localhost:8000/test

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

django-sockpuppet-0.1.0.tar.gz (20.3 kB view hashes)

Uploaded Source

Built Distribution

django_sockpuppet-0.1.0-py2.py3-none-any.whl (25.5 kB view hashes)

Uploaded Python 2 Python 3

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