Awesome Open Source
Awesome Open Source


shopyo

Featured on Weekly Python issue 436 🌟

🎁 Open inventory management and Point of sales (powered by python) for small shops.

  • πŸ‘Œ Crisp UI
  • πŸ’— Intuitive
  • πŸŽ‡ Instant lookup
  • ✏️ Towards customisation

It also makes a great Flask base and supports commands such as:

python manage.py startapp loans

Test it out!

pip install shopyo

close and reopen your cmd

shopyo new <path> <project folder>

example:

shopyo new /home/profiles/arj/desktop shopyotest

then cd into the folder

/home/profiles/arj/desktop

then install requirements (install in venv if you like)

pip install -r requirements.txt

then

python manage.py initialise
python manage.py runserver

go to url ^^

βš—οΈ Stability

beta - now in beta!

alpha - highly volatile, core features not yet finished


HitCount

πŸ’Œ Contributing Countries

πŸ‡²πŸ‡Ί πŸ‡©πŸ‡ͺ πŸ‡¨πŸ‡³ πŸ‡¬πŸ‡§ πŸ‡ΈπŸ‡¬ πŸ‡ΊπŸ‡¬ πŸ‡²x

πŸ”₯ Default Modules:

Basics:

  • Control Panel
  • Admin
  • Base
  • Login

Shop:

  • Appointment
  • Products
  • People
  • Internals
  • Settings

If you want to use the project as a Flask base, just remove the shop modules in modules/

πŸ“œ Testimonial

This is my first time contributing to a public repo and I have quite enjoyed it. If you're a first-time-contributor the community is very helpful and can help you progress. Since I have been helping in this repo, I have also learnt a few things myself. The owner of the repo is active and is always willing to help.

Also, if I'm around and you're stuck give us a shout. I'll help if I can. @blips5

πŸ“– History

I want to learn!

Months ago, I was searching github for a point of sales solution that used Python. What bothered me was that many of the applications I found were not ideal. Some required Posgres with the expectation that a user would already have this installed, others had codebases that were a mess of spaghetti code, yet others were django-based accounting monsters ...

I decided to try making my own solution, modeled after a client request, I had once recived. I Made it flask-based with SQLalchemy and SQLite. You can instantly get started with no hassle, switching to something more powerful when you want to (since it uses an ORM)

For the UI, we used the latest, bootstrap4, fa5 and jq3. Interestingly enough, I had two shop owners try it and they were very impressed with the ease of use.

It is still in devolopment and supports instant lookup. Long story short, with some programming skills, you can solve some everyday problems. And yes, no cdn, all libs are bundled so that you can use it completely offline

See this linked-in article!

πŸ“° In The News

Who uses Shopyo?

site name description
Maurilearn.com Elearning platform

TODO modules

  • Point of Sales
  • Accounting

πŸ”§ Install instructions

  • download python3.8
  • clone and cd into project
  • run python -m pip install -r requirements.txt
  • run python -m pip install -r dev_requirements.txt if you want to contribute

πŸ‘Ÿ Run instructions

cd into shopyo/shopyo if not already.

initialise and setup app.

python manage.py initialise

run the app.

python manage.py runserver

go to the indicated url

Super User password

User ID: user 
password: pass

πŸ”© Migrations

In case of change to models, do

python manage.py db migrate
pyhton manage.py db upgrade

Testing

The application makes use of end to end tests. To get these up and running you will need selenium and a chrome web driver.

  • The chromedriver is already part of the applciation folder.
  • To run tests cd into the shopyo folder and run the command. pytest.
  • To ensure your code meets PEP8 standard, run the command. flake8 shopyo.

Complete commands

initialise database.

python manage.py db init # create db from new
python manage.py db migrate
python manage.py db upgrade

clean project

python manage.py clean

removes __pycache__/, test.db and migrations.

create new module

python manage.py startapp modulename

run server

python manage.py rundebug
python manage.py runserver

create new module

πŸ“œ Docs

Sphinx docs generater

Run

sphinx-build -b html sphinx_source docs

in shopyo/ to generate docs

Read the docs for Sphinx Alablaster

🚧 Developing Modules

Modules are found in the modules folder.

A typical structure is as follows:

apple/
    templates/
        apple/
    view.py
    models.py
    info.json

You must ensure that

  • The view is named view.py
  • The info is named info.json
  • The module folder and the folder inside templates both have the same name
  • Blueprints must be named <nameofmodulefolder>_blueprint, in this demo apple_blueprint

And ... the app will load all the modules, just make sure in info.json you keep url_prefix, type, name, and fa-icon

For the time being it's best to look into existing modules and do the same.

♨️ Contributing

Shopyo internals explained here: Shopyo: Enhance Your Flask by Exploring An Advanced Flask App

If you want to contribute, go ahead, we ❀️ it. We follow a πŸ’― % first-timers-friendly policy.

  • Fork repo.

  • Create a new branch. For example: bg-fix-migration-file.

  • Once you have add your changes ensure tests are still passing.

  • Add tests for any new functionality added.

  • Ensure you commits follow the standard specified here.

  • Follow the Pull request template.

  • Add your country flag in readme after accepted PR

  • Update fork as below then

  • Push

git push origin <branch-name>
  • If it closes an issue, add Fixes #94 for example, as seen here
  • PR against dev branch, not master

Update Fork

cd <your/local/cloned/repo/path/here>
git remote add upstream https://github.com/Abdur-rahmaanJ/shopyo.git
git fetch upstream
git pull upstream master

πŸ’¬ Community: Discord

https://discord.gg/k37Ef6w

FaQ

Why do we need another folder in templates?

Flask loads all templates in one namespace. If you specify apple/index.html flask will load the index.html in the apple folder in templates

Roadmap

  • βœ”οΈ Models
  • βœ”οΈ Migrations
  • βœ”οΈ Restful Api
  • βœ”οΈ Manage.py
  • βœ”οΈ CSRF protection
  • βœ”οΈ Easy dev/production mode switch
  • βœ”οΈ Login
  • βœ”οΈ Api namespacing / apps
  • βœ”οΈ Django-like structure (where models, views and templates all in one folder)
  • βœ”οΈ Relative reference (.forms for example)
  • βœ”οΈ Roles management

In Progress

  • πŸ”ƒ Unit tests
  • πŸ”ƒ Integration tests
  • πŸ”ƒ Permission levels

Contributing main options via main

  • clone project
  • create and activate venv
  • cd into project folder
  • run pip install -e .
  • after changes run pip install -e . --upgrade
  • test shopyo <your options>

πŸ“ž Contact

Support team if you are stuck

🍳 In Action

credits

digits.net


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,555,917)Β 
Python (1,141,503)Β 
Hacktoberfest (36,020)Β 
Flask (9,859)Β 
Web (7,729)Β 
Ecommerce (2,563)Β 
Inventory (480)Β 
Erp (421)Β 
Open (378)Β 
Pos (338)Β 
Inventory Management (239)Β 
Point Of Sale (182)Β 
Related Projects
Advertising πŸ“¦Β 9
All Projects
Application Programming Interfaces πŸ“¦Β 120
Applications πŸ“¦Β 181
Artificial Intelligence πŸ“¦Β 72
Blockchain πŸ“¦Β 70
Build Tools πŸ“¦Β 111
Cloud Computing πŸ“¦Β 79
Code Quality πŸ“¦Β 28
Collaboration πŸ“¦Β 30
Command Line Interface πŸ“¦Β 48
Community πŸ“¦Β 81
Companies πŸ“¦Β 60
Compilers πŸ“¦Β 60
Computer Science πŸ“¦Β 74
Configuration Management πŸ“¦Β 39
Content Management πŸ“¦Β 167
Control Flow πŸ“¦Β 197
Data Formats πŸ“¦Β 77
Data Processing πŸ“¦Β 266
Data Storage πŸ“¦Β 132
Economics πŸ“¦Β 60
Frameworks πŸ“¦Β 198
Games πŸ“¦Β 122
Graphics πŸ“¦Β 103
Hardware πŸ“¦Β 148
Integrated Development Environments πŸ“¦Β 47
Learning Resources πŸ“¦Β 147
Legal πŸ“¦Β 28
Libraries πŸ“¦Β 119
Lists Of Projects πŸ“¦Β 21
Machine Learning πŸ“¦Β 336
Mapping πŸ“¦Β 61
Marketing πŸ“¦Β 15
Mathematics πŸ“¦Β 55
Media πŸ“¦Β 228
Messaging πŸ“¦Β 97
Networking πŸ“¦Β 304
Operating Systems πŸ“¦Β 84
Operations πŸ“¦Β 120
Package Managers πŸ“¦Β 52
Programming Languages πŸ“¦Β 229
Runtime Environments πŸ“¦Β 96
Science πŸ“¦Β 42
Security πŸ“¦Β 375
Social Media πŸ“¦Β 26
Software Architecture πŸ“¦Β 70
Software Development πŸ“¦Β 68
Software Performance πŸ“¦Β 57
Software Quality πŸ“¦Β 127
Text Editors πŸ“¦Β 45
Text Processing πŸ“¦Β 131
User Interface πŸ“¦Β 310
User Interface Components πŸ“¦Β 465
Version Control πŸ“¦Β 29
Virtualization πŸ“¦Β 68
Web Browsers πŸ“¦Β 38
Web Servers πŸ“¦Β 25
Web User Interface πŸ“¦Β 194