Alternatives to Jinja for Flask-Based Desktop App Using PyInstaller and WebView
I'm developing a desktop application using the following tech stack:
Frontend: HTML, CSS, JavaScript, Jinja2 (current template engine)
Backend: Flask
Packaging: PyInstaller to create a `.exe`
UI: WebView for Windows
I am currently using Jinja2 for templating, but I want to explore other template engines that might provide better performance or additional features. My main requirements are:
1. Compatibility with Flask: Should integrate easily without much configuration.
2. Support for Desktop Apps: Must work well with PyInstaller when packaging the app.
3. Efficient Rendering: Performance is key, as the app is intended for desktop use.
Are there any good alternatives to Jinja2 that would fit well within this stack? Any advice on integration or potential challenges would be appreciated!
Thank you!
/r/flask
https://redd.it/1f8me1y
I'm developing a desktop application using the following tech stack:
Frontend: HTML, CSS, JavaScript, Jinja2 (current template engine)
Backend: Flask
Packaging: PyInstaller to create a `.exe`
UI: WebView for Windows
I am currently using Jinja2 for templating, but I want to explore other template engines that might provide better performance or additional features. My main requirements are:
1. Compatibility with Flask: Should integrate easily without much configuration.
2. Support for Desktop Apps: Must work well with PyInstaller when packaging the app.
3. Efficient Rendering: Performance is key, as the app is intended for desktop use.
Are there any good alternatives to Jinja2 that would fit well within this stack? Any advice on integration or potential challenges would be appreciated!
Thank you!
/r/flask
https://redd.it/1f8me1y
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Introducing WSCE: A Custom Shell Environment Built with Python
Over the past few weeks, I've been working on a custom shell environment called **WSCE**. Built entirely in Python, it mimics the functionality of an operating system and comes packed with features like a fake boot sequence, a text editor, and more. It's designed to provide a unique experience that blends the line between an OS and a shell environment.
# What My Project Does
WSCE is a simulated operating system environment built as a Python-based shell. It offers a range of features such as:
* **FakeBoot:** Emulates the boot process of an actual operating system.
* **Aurora Text Editor:** A simple text editor to mimic basic productivity tools.
* **CommandSearch:** A script that searches a folder for python files to make into custom commands
# Target Audience
This project is primarily a passion project and is not intended for production use. It is targeted at hobbyists, Python developers, and those interested in exploring custom shell environments or unique OS simulations. It's perfect for those who enjoy tinkering with code and experimenting with unconventional software projects.
# Comparison to Existing Alternatives
WSCE stands out because it's not like any other shell environment or operating system out there. Unlike traditional shells or full OS environments, this project focuses on simulating
/r/Python
https://redd.it/1f8sslp
Over the past few weeks, I've been working on a custom shell environment called **WSCE**. Built entirely in Python, it mimics the functionality of an operating system and comes packed with features like a fake boot sequence, a text editor, and more. It's designed to provide a unique experience that blends the line between an OS and a shell environment.
# What My Project Does
WSCE is a simulated operating system environment built as a Python-based shell. It offers a range of features such as:
* **FakeBoot:** Emulates the boot process of an actual operating system.
* **Aurora Text Editor:** A simple text editor to mimic basic productivity tools.
* **CommandSearch:** A script that searches a folder for python files to make into custom commands
# Target Audience
This project is primarily a passion project and is not intended for production use. It is targeted at hobbyists, Python developers, and those interested in exploring custom shell environments or unique OS simulations. It's perfect for those who enjoy tinkering with code and experimenting with unconventional software projects.
# Comparison to Existing Alternatives
WSCE stands out because it's not like any other shell environment or operating system out there. Unlike traditional shells or full OS environments, this project focuses on simulating
/r/Python
https://redd.it/1f8sslp
Reddit
From the Python community on Reddit: Introducing WSCE: A Custom Shell Environment Built with Python
Explore this post and more from the Python community
Nice looking, data display tables in Python? +Video
Ahoy, I wanted to share a video my buddies made. They maintain the great_tables package, a library for building pretty tables with Python, e.g. for publication or the web. If that's something you might want to do, you might want to check this out.
Here's their video, https://youtu.be/M5zwlb8OzS0
Here's the package doc site, https://posit-dev.github.io/great-tables/
Here's the repo, https://github.com/posit-dev/great-tables
How do you approach creating publication ready tables from your python analytics?
/r/Python
https://redd.it/1f8zg2c
Ahoy, I wanted to share a video my buddies made. They maintain the great_tables package, a library for building pretty tables with Python, e.g. for publication or the web. If that's something you might want to do, you might want to check this out.
Here's their video, https://youtu.be/M5zwlb8OzS0
Here's the package doc site, https://posit-dev.github.io/great-tables/
Here's the repo, https://github.com/posit-dev/great-tables
How do you approach creating publication ready tables from your python analytics?
/r/Python
https://redd.it/1f8zg2c
YouTube
Great Tables: Make beautiful, publication quality tables in Python | Rich Iannone & Michael Chow
Tables are undeniably useful for data work. We have many great DataFrame libraries available in Python, and they give us flexibility in terms of manipulating data at will, but what happens when presenting tables to others?
It's nice to display tables. Tables…
It's nice to display tables. Tables…
Agency together
Hey guys, been wanting to open up a tech agency where I can create website, web apps, mobile apps and other stuff.
Looking for someone who can help with dev as well as marketing etc.
Dm me if anyone of your guys are interested.
/r/flask
https://redd.it/1f8vab2
Hey guys, been wanting to open up a tech agency where I can create website, web apps, mobile apps and other stuff.
Looking for someone who can help with dev as well as marketing etc.
Dm me if anyone of your guys are interested.
/r/flask
https://redd.it/1f8vab2
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Is Python easier to break into than other languages coming fron experience in a different stack?
Im looking to get out of.net because its a career dead end in my local area but no java jobs consider me even though i have spring boot projects. Python seems less opinionated with libraries like fastapi so i wonder if its easier to break in as a generalist.
/r/Python
https://redd.it/1f92ekl
Im looking to get out of.net because its a career dead end in my local area but no java jobs consider me even though i have spring boot projects. Python seems less opinionated with libraries like fastapi so i wonder if its easier to break in as a generalist.
/r/Python
https://redd.it/1f92ekl
Reddit
Is Python easier to break into than other languages coming fron experience in a different stack? : r/Python
57 votes, 23 comments. 1.3M subscribers in the Python community. The official Python community for Reddit! Stay up to date with the latest news…
Hello guys i need help with something I'm using jupyter notebook for object detection but when i use this code: if cv2.waitkey(1) & 0xFF == ord('q'): break it shows this error: module 'cv2' has no attribute 'waitkey' Does anyone know why?
/r/IPython
https://redd.it/1f90tlr
/r/IPython
https://redd.it/1f90tlr
Reddit
From the IPython community on Reddit
Explore this post and more from the IPython community
What are you best tips for managing the database state with a small team?
Small team working on a SaaS project with Django as the back end. We're all new to Django, and we're running into issues where the database and migrations keep getting out of sync.
We use github, and are developing locally. I'm sure this is a super common problem with easy fixes, and advice?
/r/django
https://redd.it/1f90c5z
Small team working on a SaaS project with Django as the back end. We're all new to Django, and we're running into issues where the database and migrations keep getting out of sync.
We use github, and are developing locally. I'm sure this is a super common problem with easy fixes, and advice?
/r/django
https://redd.it/1f90c5z
Reddit
From the django community on Reddit
Explore this post and more from the django community
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1f98kuz
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1f98kuz
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
D Efficient way to store large datasets
I’m collecting trajectories for imitation learning (RL) and each trajectory is about 1500 time steps long, consists of 4 image streams of about 600x600 pixels.
Obviously, the dataset size grows extremely quickly with the number of trajectories.
What are some good libraries for efficiently (in terms of disk space) storing such data? I tried h5py with level 9 gzip compression but the files are still way too large. Is there a better alternative?
Saving and loading times do not really matter.
Most resources online are aimed at efficiently loading large datasets or handling them in memory which is not relevant for my question.
I already use uint8 as datatype for the rgb streams.
/r/MachineLearning
https://redd.it/1f951p8
I’m collecting trajectories for imitation learning (RL) and each trajectory is about 1500 time steps long, consists of 4 image streams of about 600x600 pixels.
Obviously, the dataset size grows extremely quickly with the number of trajectories.
What are some good libraries for efficiently (in terms of disk space) storing such data? I tried h5py with level 9 gzip compression but the files are still way too large. Is there a better alternative?
Saving and loading times do not really matter.
Most resources online are aimed at efficiently loading large datasets or handling them in memory which is not relevant for my question.
I already use uint8 as datatype for the rgb streams.
/r/MachineLearning
https://redd.it/1f951p8
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Yet another 12 factor configuration helper : python-direnv
Hi Python! I've developed another app to manage environment variables.
# What My Project Does
This allows you to `load_direnv()` your environment variables like `load_dotenv()`, once you allow them through `direnv`, but unlocks the full power of the bash shell instead of being limited to basic key-value pairs. Contributions welcome (the package is not yet on Pypi.org, working on it) !
# Target Audience
If you are developing using the 12 factor app principles and are a user or direnv, Nix, or Guix you might want to check out this package I just wrote : https://github.com/nicolas-graves/python-direnv
# Comparison
This package is actually quite different to other similar projects. It doesn't use a parser but loads environment variables based on shell environment changes. This allows for instance full environment configuration using Nix or Guix for instance, thus providing a way to load a complete environment from a simple `__file__` variable, in any Python project. I have another project on the way that needed this for real-life application ;)
/r/Python
https://redd.it/1f9jfgv
Hi Python! I've developed another app to manage environment variables.
# What My Project Does
This allows you to `load_direnv()` your environment variables like `load_dotenv()`, once you allow them through `direnv`, but unlocks the full power of the bash shell instead of being limited to basic key-value pairs. Contributions welcome (the package is not yet on Pypi.org, working on it) !
# Target Audience
If you are developing using the 12 factor app principles and are a user or direnv, Nix, or Guix you might want to check out this package I just wrote : https://github.com/nicolas-graves/python-direnv
# Comparison
This package is actually quite different to other similar projects. It doesn't use a parser but loads environment variables based on shell environment changes. This allows for instance full environment configuration using Nix or Guix for instance, thus providing a way to load a complete environment from a simple `__file__` variable, in any Python project. I have another project on the way that needed this for real-life application ;)
/r/Python
https://redd.it/1f9jfgv
PyPI
PyPI · The Python Package Index
The Python Package Index (PyPI) is a repository of software for the Python programming language.
simple project suggestion
i don't know if this is the place to ask this but can you suggest a github repo of a simple (not necessarily) django project that inside it users can enter their information inside a form and then the website has a section that displays all these users somewhere, anything remotely close to this is good enough i'll change it up a little bit, its a project for my teacher but i don't have a lot of time to do it all myself, just need a simple local project, Thank you in advance
/r/django
https://redd.it/1f9j943
i don't know if this is the place to ask this but can you suggest a github repo of a simple (not necessarily) django project that inside it users can enter their information inside a form and then the website has a section that displays all these users somewhere, anything remotely close to this is good enough i'll change it up a little bit, its a project for my teacher but i don't have a lot of time to do it all myself, just need a simple local project, Thank you in advance
/r/django
https://redd.it/1f9j943
Reddit
From the django community on Reddit
Explore this post and more from the django community
I've been tracking Python, Django, NumPy and several other frameworks in job listings this year
Hi all, I built a website to track programing languages/skills/frameworks in jobs.
Perhaps unsurprsingly Python is by far the biggest category in software engineering:
I'm tracking many other Python frameworks and libraries as well:
[Django](https://job.zip/trend/django)
Scikit-learn
[NumPy](https://job.zip/trend/numpy)
Flask
[FastAPI](https://job.zip/trend/fastapi)
Keras
[MicroPython](https://job.zip/trend/micropython)
Ruff
I hope this is of some use of you, if there's another framework you'd like me track, please let me know!
Also there's a Python component as well, I use Python to identify trends in my dataset. Every month I load up 10 million new jobs and compare them with the months before to identify new types of jobs to add to the site.
/r/Python
https://redd.it/1f9l9zt
Hi all, I built a website to track programing languages/skills/frameworks in jobs.
Perhaps unsurprsingly Python is by far the biggest category in software engineering:
I'm tracking many other Python frameworks and libraries as well:
[Django](https://job.zip/trend/django)
Scikit-learn
[NumPy](https://job.zip/trend/numpy)
Flask
[FastAPI](https://job.zip/trend/fastapi)
Keras
[MicroPython](https://job.zip/trend/micropython)
Ruff
I hope this is of some use of you, if there's another framework you'd like me track, please let me know!
Also there's a Python component as well, I use Python to identify trends in my dataset. Every month I load up 10 million new jobs and compare them with the months before to identify new types of jobs to add to the site.
/r/Python
https://redd.it/1f9l9zt
job.zip
Python trend - Hiring & Salary - Job.zip
Python Libraries to Extract Table from PDF
Here's a blog with a tutorial using multiple Python libraries to extract tables: https://unstract.com/blog/extract-tables-from-pdf-python/
Video tutorial: https://www.youtube.com/live/YfW5vVwgbyo?t=2799s
/r/Python
https://redd.it/1f9fv7y
Here's a blog with a tutorial using multiple Python libraries to extract tables: https://unstract.com/blog/extract-tables-from-pdf-python/
Video tutorial: https://www.youtube.com/live/YfW5vVwgbyo?t=2799s
/r/Python
https://redd.it/1f9fv7y
Unstract.com →
Python Libraries to Extract Tables From PDF: A Comparison
What is the best Python library to parse tables from PDFs? In this comparison article we evaluate 4 Python libraries and compare them based on ease of use, accuracy and output structure.
nb2dash: Convert Jupyter notebooks to interactive dashboards with WASM
Hey r/ipython! Today, I'm lauching nb2dash, a tool to convert Jupyter notebooks into dashboards, and I'd love to get your feedback.
https://nb2dash.ploomberapp.io
You can see a sample dashboard here: https://nb2dash.ploomberapp.io/notebook/bb8086c0
https://reddit.com/link/1f9rajw/video/hr40j3dht0nd1/player
# What it does
Upload your Jupyter notebook (.ipynb file)
Get back a link to an interactive dashboard version of your notebook
# Target Audience
Data practitioners who want to easily share an interactive analysis, machine learning model or any other interactive app.
# Key features
Free to use: No sign-up required
Easy: Just drag and drop your notebook file
Quick: Processing usually takes 1-2 minutes
Shareable: Get a link you can send to anyone
# Tech stack
Flask for the web app (receive uploads and process notebook)
NGINX for rendering processed notebooks
Voici for converting notebooks into standalone WASM pages
Redis and rq for task queueing
# Comparison
When people want to share a notebook, they often convert it into HTML or PDF. However, this is hinders interactivity. Alternatively, you might use Voila to deploy it as a web app but that requires paying to a hosting provider. Voici uses WASM, meaning your notebook is a static site and all compute happens locally, reducing cost by a huge margin. Note that WASM and Voici are still early technologies
/r/IPython
https://redd.it/1f9rajw
Hey r/ipython! Today, I'm lauching nb2dash, a tool to convert Jupyter notebooks into dashboards, and I'd love to get your feedback.
https://nb2dash.ploomberapp.io
You can see a sample dashboard here: https://nb2dash.ploomberapp.io/notebook/bb8086c0
https://reddit.com/link/1f9rajw/video/hr40j3dht0nd1/player
# What it does
Upload your Jupyter notebook (.ipynb file)
Get back a link to an interactive dashboard version of your notebook
# Target Audience
Data practitioners who want to easily share an interactive analysis, machine learning model or any other interactive app.
# Key features
Free to use: No sign-up required
Easy: Just drag and drop your notebook file
Quick: Processing usually takes 1-2 minutes
Shareable: Get a link you can send to anyone
# Tech stack
Flask for the web app (receive uploads and process notebook)
NGINX for rendering processed notebooks
Voici for converting notebooks into standalone WASM pages
Redis and rq for task queueing
# Comparison
When people want to share a notebook, they often convert it into HTML or PDF. However, this is hinders interactivity. Alternatively, you might use Voila to deploy it as a web app but that requires paying to a hosting provider. Voici uses WASM, meaning your notebook is a static site and all compute happens locally, reducing cost by a huge margin. Note that WASM and Voici are still early technologies
/r/IPython
https://redd.it/1f9rajw
One more Question
in jupyter notebook when i try to save a photo for object detection it shows this error:
<string>:1: SyntaxWarning: invalid escape sequence '\w'
even when i try to set variables
Does anyone know the reason?
/r/IPython
https://redd.it/1f9lwqd
in jupyter notebook when i try to save a photo for object detection it shows this error:
<string>:1: SyntaxWarning: invalid escape sequence '\w'
even when i try to set variables
Does anyone know the reason?
/r/IPython
https://redd.it/1f9lwqd
Reddit
From the IPython community on Reddit
Explore this post and more from the IPython community
PEP695 Migration Tool
Now that PEP 695 is a little over 2 years old and it has been almost a year since it was officially introduced in python 3.12, the new type parameter syntax will slowly become the standard way of defining TypeVars, ParamSpecs and TypeVarTuples as well as creating Type aliases with the
# What My Project Does
This is why the past few days I spent time building
Install
Format code using
More info, including examples of code that
https://github.com/yowoda/pep695
# Target
/r/Python
https://redd.it/1f9uai8
Now that PEP 695 is a little over 2 years old and it has been almost a year since it was officially introduced in python 3.12, the new type parameter syntax will slowly become the standard way of defining TypeVars, ParamSpecs and TypeVarTuples as well as creating Type aliases with the
type keyword. After I spent some time using python the last couple of weeks, I realized that adapting "old" projects of mine to the new syntax really takes more time than I'm willing to invest, especially as some have a pretty large codebase.# What My Project Does
This is why the past few days I spent time building
pep695, a tool that automatically rewrites code to conform to PEP 695 syntax for you. Install
pep695 using pip:pip install pep695Format code using
pep695 format <path1> <path2> <pathN> ... [-p | --parallel] or just check for errors using pep695 check <path1> <path2> <pathN>. I just published this project today which is why I'm still looking for people to test this project on their own codebase, doesn't matter if it's small or large, any feedback is appreciated!More info, including examples of code that
pep695 can rewrite for you on the github repo:https://github.com/yowoda/pep695
# Target
/r/Python
https://redd.it/1f9uai8
Python Enhancement Proposals (PEPs)
PEP 695 – Type Parameter Syntax | peps.python.org
This PEP specifies an improved syntax for specifying type parameters within a generic class, function, or type alias. It also introduces a new statement for declaring type aliases.
Any tips for courses with a full application that aren't on video?
I recently discovered William Vincent's book which is a step by step application, starting with Docker, I'm looking for things like that because it's a way to learn DevOps as well. However, most of them are Udemy courses, and video is more complex!
Note: The only problem with the book is that it's from 2019, but I'll adapt to the time.
/r/django
https://redd.it/1f9r2h6
I recently discovered William Vincent's book which is a step by step application, starting with Docker, I'm looking for things like that because it's a way to learn DevOps as well. However, most of them are Udemy courses, and video is more complex!
Note: The only problem with the book is that it's from 2019, but I'll adapt to the time.
/r/django
https://redd.it/1f9r2h6
Reddit
From the django community on Reddit
Explore this post and more from the django community
Interactive Mapping with ipyopenlayers
https://blog.jupyter.org/interactive-mapping-with-ipyopenlayers-2b8bc93bb6c4
/r/IPython
https://redd.it/1f9r0hs
https://blog.jupyter.org/interactive-mapping-with-ipyopenlayers-2b8bc93bb6c4
/r/IPython
https://redd.it/1f9r0hs
Medium
Interactive Mapping with ipyopenlayers
Bringing the Power of OpenLayers to Jupyter.
Hey Django community, I heard a lot of you use PostgreSQL! If you do, please take a moment and fill out the 2024 State of PostgreSQL Survey. It's created for the community, by the community; the more responses, the more accurate and helpful the results. Any questions or comments? Let's talk!
https://form.typeform.com/to/wtUFIZwA
/r/django
https://redd.it/1fa298d
https://form.typeform.com/to/wtUFIZwA
/r/django
https://redd.it/1fa298d
Typeform
The State of PostgreSQL 2024 survey is now open! 🎉
Share your experiences and feedback with the larger PostgreSQL community! Complete the survey before September 30th at 11:59 pm PT.