Giter Club home page Giter Club logo

django-sockpuppet's Introduction

Welcome to Sockpuppet ๐Ÿ‘‹

downloads License: MIT Documentation
semantic-release Tests

๐ŸŽ‰ You just discovered an exciting new way to build modern, reactive, real-time apps with Django.

Why should I spend time exploring this? If you use current frontend libraries, such as react, vue or angular you end up creating state for the frontend and then updating state changes in the backend through an api.

This means that you forgo server-rendered html with the advantages that brings + you'll end up with a more complex app overall.

With this library you can still use normal django templates, and any frontend state you change will be directly reflected in the backend. Currently this happens through the use of websockets.

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

Hit me up on twitter if you have any questions. Twitter follow

๐Ÿ“š Documentation

โšก๏ธ Get started

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

  • Discord - We share the discord together with stimulus-reflex, and there is a channel dedicated for python/django discussions.
  • django-sockpuppet-expo - Do you want more examples? There code examples of chats, book search, etc ... We accept PRs :)

๐Ÿ›  Development in the repo

See some common commands that can be useful for development

pip install -r requirements_dev.txt
invoke -l

Try out a minimal example manually

git clone [email protected]:jonathan-s/django-sockpuppet.git
npm install
npm run build:test
python manage.py runserver
# visit https://localhost:8000/test

๐Ÿ”œ Release

pip install -r requirements_dev.txt
invoke release -b feature

django-sockpuppet's People

Contributors

jonathan-s avatar hopsoft avatar leastbad avatar henrik avatar andrewmcodes avatar damnedscholar avatar julianrubisch avatar ali-ehmed avatar zodman avatar silva96 avatar jefftriplett avatar websebdev avatar dependabot[bot] avatar sztheory avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.