Anything similar to Wallaby.js for Python?
It's a continuous test runner that shows inline annotations of the value of variables in the IDE.
https://wallabyjs.com/
/r/Python
https://redd.it/12tro1b
It's a continuous test runner that shows inline annotations of the value of variables in the IDE.
https://wallabyjs.com/
/r/Python
https://redd.it/12tro1b
Wallabyjs
Wallaby - Immediate JavaScript test feedback in your IDE as-you-type
Wallaby runs your JavaScript and TypeScript tests immediately as you type in VS Code, WebStorm and other editors, highlighting results next to your code.
I built an API with Flask based on the adult animated sitcom Archer
The API provides data about Archer's characters, episodes and quotes:
https://www.archerapi.com/
Source code: https://github.com/ben-n93/archer\_api
Any feedback is greatly appreciated as this is my first API/Flask project.
Thanks!
/r/flask
https://redd.it/12tqtpn
The API provides data about Archer's characters, episodes and quotes:
https://www.archerapi.com/
Source code: https://github.com/ben-n93/archer\_api
Any feedback is greatly appreciated as this is my first API/Flask project.
Thanks!
/r/flask
https://redd.it/12tqtpn
GitHub
GitHub - ben-n93/archer_api: Archer API
Archer API. Contribute to ben-n93/archer_api development by creating an account on GitHub.
QR Code, Scanning?
Continuing to battle away on my app, and it's coming together. When the user registers I generate a uniqueID and i'm displaying that on their dashboard as a QR Code. The idea is on a separate page they can add the uniqueID code and it will compare their film watchlist and other users. I have a page that does the comparison and it works great adding the code manually. The next step is adding a button to open the camera and extract this 15-digit code from the QR code to enter into the input box.
Is there an easy way of doing this? chatgtp wants me to integrate a script into the HTML file, The code is below, and it doesn't do a thing....
​
'''
{% extends 'base.html' %}
{% block content %}
<h1>Find Something To Chill Too</h1>
<form method="POST">
<label for="unique_id">Enter unique ID:</label>
<input type="text" id="unique_id" name="unique_id">
<button type="submit">Find Similar Users</button>
/r/flask
https://redd.it/12tullw
Continuing to battle away on my app, and it's coming together. When the user registers I generate a uniqueID and i'm displaying that on their dashboard as a QR Code. The idea is on a separate page they can add the uniqueID code and it will compare their film watchlist and other users. I have a page that does the comparison and it works great adding the code manually. The next step is adding a button to open the camera and extract this 15-digit code from the QR code to enter into the input box.
Is there an easy way of doing this? chatgtp wants me to integrate a script into the HTML file, The code is below, and it doesn't do a thing....
​
'''
{% extends 'base.html' %}
{% block content %}
<h1>Find Something To Chill Too</h1>
<form method="POST">
<label for="unique_id">Enter unique ID:</label>
<input type="text" id="unique_id" name="unique_id">
<button type="submit">Find Similar Users</button>
/r/flask
https://redd.it/12tullw
Reddit
r/flask on Reddit: QR Code, Scanning?
Posted by u/thegasman2000 - No votes and no comments
Built This GPT-Powered Document Search and Question Answering App with Django
Thought you guys might appreciate this. It's a starter app to build apps that interact with documents and use Large Language Models like GPT3 to find documents and answer questions.
The core libraries are:
1. Django
2. Django Channels
3. Django Ninja
4. Redis
5. Celery
6. LlamaIndex
7. Langchain
8. OpenAI
9. React
10. Docker & Docker Compose
Repo here and a detailed walkthrough here . Checkout the short video below. Feedback and/or contributions are welcome!
Demo of Django-Powered Document Search and Question Answering Tool
/r/django
https://redd.it/12tmsin
Thought you guys might appreciate this. It's a starter app to build apps that interact with documents and use Large Language Models like GPT3 to find documents and answer questions.
The core libraries are:
1. Django
2. Django Channels
3. Django Ninja
4. Redis
5. Celery
6. LlamaIndex
7. Langchain
8. OpenAI
9. React
10. Docker & Docker Compose
Repo here and a detailed walkthrough here . Checkout the short video below. Feedback and/or contributions are welcome!
Demo of Django-Powered Document Search and Question Answering Tool
/r/django
https://redd.it/12tmsin
Django Project
The web framework for perfectionists with deadlines.
Share Jupyter Notebook on Hugging Face Spaces with Mercury
Have you ever have to rewrite Python notebook to Flask or Streamlit or Dash?
I created a step-by-step guide on how to share Jupyter Notebooks on Hugging Face Spaces with Mercury.
- Hugging Face Spaces is a service for hosting data web apps,
- Mercury is a framework for converting Jupyter Notebooks to interactive apps (Voila killer),
- you can use both technologies to share Python notebooks to non-technical users
/r/Python
https://redd.it/12tz52r
Have you ever have to rewrite Python notebook to Flask or Streamlit or Dash?
I created a step-by-step guide on how to share Jupyter Notebooks on Hugging Face Spaces with Mercury.
- Hugging Face Spaces is a service for hosting data web apps,
- Mercury is a framework for converting Jupyter Notebooks to interactive apps (Voila killer),
- you can use both technologies to share Python notebooks to non-technical users
/r/Python
https://redd.it/12tz52r
Runmercury
Deploy Jupyter Notebooks at Hugging Face Spaces with Mercury
Build Web Apps from Jupyter Notebook
Records not showing up on a Model's admin panel page
Hi everyone!
I've been using Django for quite a while and I'm facing a problem I've never faced before. I had a few models and some data in the database. It was an old codebase and everything was working fine.
I made a few changes and created a new migration and applied it to the database. Now for some reason, I CAN see the model on the admin panel BUT CANNOT see any records. While querying the shell I can tell that there are at least 60 objects that should show up. But there are 0 that show up on the admin panel. All the DRF APIs - that perform various CRUD actions on the model - are working perfectly fine.
Can anybody give me any leads or advice on how I should go about this and what I should look for?
The model -
```
class Magazine(BaseEntityModel):
user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete=models.SET_NULL)
title = models.TextField(max_length=255) # max_length 100
description = models.TextField(blank=True)
cover_art_path = models.CharField(max_length=140, default="No path available")
feature_img_path = models.CharField(max_length=140, default="No path available")
view_count = models.PositiveIntegerField(default=0)
likes_count
/r/djangolearning
https://redd.it/12u376u
Hi everyone!
I've been using Django for quite a while and I'm facing a problem I've never faced before. I had a few models and some data in the database. It was an old codebase and everything was working fine.
I made a few changes and created a new migration and applied it to the database. Now for some reason, I CAN see the model on the admin panel BUT CANNOT see any records. While querying the shell I can tell that there are at least 60 objects that should show up. But there are 0 that show up on the admin panel. All the DRF APIs - that perform various CRUD actions on the model - are working perfectly fine.
Can anybody give me any leads or advice on how I should go about this and what I should look for?
The model -
```
class Magazine(BaseEntityModel):
user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete=models.SET_NULL)
title = models.TextField(max_length=255) # max_length 100
description = models.TextField(blank=True)
cover_art_path = models.CharField(max_length=140, default="No path available")
feature_img_path = models.CharField(max_length=140, default="No path available")
view_count = models.PositiveIntegerField(default=0)
likes_count
/r/djangolearning
https://redd.it/12u376u
Reddit
r/djangolearning on Reddit: Records not showing up on a Model's admin panel page
Posted by u/saurabh0719 - No votes and no comments
Bad URL Logging
When a user types in www.site.com/nonexistent I want to log the bad url they type in. How can I catch posted bad request after the slash?
/r/flask
https://redd.it/12u1gu8
When a user types in www.site.com/nonexistent I want to log the bad url they type in. How can I catch posted bad request after the slash?
/r/flask
https://redd.it/12u1gu8
Salesforce
Overview
Go digital fast and empower your teams to work from anywhere. Develop scalable, custom business apps with low-code development or give your teams the tools to build with services and APIs.
Productivity tools
I just installed debug toolbar and browser reload. Both are amazing and wondering what else I should be using to make life easier.
/r/django
https://redd.it/12u1di0
I just installed debug toolbar and browser reload. Both are amazing and wondering what else I should be using to make life easier.
/r/django
https://redd.it/12u1di0
Reddit
r/django on Reddit: Productivity tools
Posted by u/AttractiveCorpse - 6 votes and 11 comments
If I want to create a inventory app which will be SaaS , every user will have his own stores, products and invoices..etc .. what approach I should use ?
Should I create product and store tables contain userID or I should have separated Database for every user ? And how to achieve the second approach if its better ?
/r/django
https://redd.it/12u18ga
Should I create product and store tables contain userID or I should have separated Database for every user ? And how to achieve the second approach if its better ?
/r/django
https://redd.it/12u18ga
Reddit
r/django on Reddit: If I want to create a inventory app which will be SaaS , every user will have his own stores, products and…
Posted by u/Suspicious_Driver761 - 5 votes and 5 comments
NiceGUI 1.2.9 with "refreshable" UI functions, better dark mode support and an interactive styling demo
We are happy to announce NiceGUI 1.2.9. NiceGUI is an open-source Python library to write graphical user interfaces which run in the browser. It has a very gentle learning curve while still offering the option for advanced customizations. NiceGUI follows a backend-first philosophy: it handles all the web development details. You can focus on writing Python code.
### New features and enhancements
- Introduce `ui.refreshable`
- Add
- Introduce `ui.dark_mode`
- Add min/max/step/prefix/suffix parameters to `ui.number`
- Switch back to Starlette's
- Relax version restriction for FastAPI dependency
### Bugfixes
- Fix `ui.upload` behind reverse proxy with subpath
- Fix hidden label when text is 0
### Documentation
- Add an interactive demo for classes, style and props
- Improve documentation for `ui.timer`
- Add a demo for creating a
Thanks for the awesome new contributions. We would also point out that in 1.2.8 we have already introduced the capability to use emoji as favicon. Now you can write:
/r/Python
https://redd.it/12u2b9w
We are happy to announce NiceGUI 1.2.9. NiceGUI is an open-source Python library to write graphical user interfaces which run in the browser. It has a very gentle learning curve while still offering the option for advanced customizations. NiceGUI follows a backend-first philosophy: it handles all the web development details. You can focus on writing Python code.
### New features and enhancements
- Introduce `ui.refreshable`
- Add
enable and disable methods for input elements- Introduce `ui.dark_mode`
- Add min/max/step/prefix/suffix parameters to `ui.number`
- Switch back to Starlette's
StaticFiles- Relax version restriction for FastAPI dependency
### Bugfixes
- Fix `ui.upload` behind reverse proxy with subpath
- Fix hidden label when text is 0
### Documentation
- Add an interactive demo for classes, style and props
- Improve documentation for `ui.timer`
- Add a demo for creating a
ui.table from a pandas dataframeThanks for the awesome new contributions. We would also point out that in 1.2.8 we have already introduced the capability to use emoji as favicon. Now you can write:
from nicegui import ui
ui.label("NiceGUI Rocks!")
ui.run(favicon="🚀")
/r/Python
https://redd.it/12u2b9w
nicegui.io
ui.upload | NiceGUI
NiceGUI is an easy-to-use, Python-based UI framework, which shows up in your web browser. You can create buttons, dialogs, Markdown, 3D scenes, plots and much more.
Export all open notebooks as HTML
Hi..I have multiplier notebooks open on Jupyter Lab. I would like to export them all at once, as opposed to one at a time. Any ideas? Thanks in advance!
/r/JupyterNotebooks
https://redd.it/12u2qha
Hi..I have multiplier notebooks open on Jupyter Lab. I would like to export them all at once, as opposed to one at a time. Any ideas? Thanks in advance!
/r/JupyterNotebooks
https://redd.it/12u2qha
Reddit
r/JupyterNotebooks on Reddit: Export all open notebooks as HTML
Posted by u/Bluegenio - 2 votes and no comments
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?
Use this thread to chat about and share Python resources!
/r/Python
https://redd.it/12unks8
Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?
Use this thread to chat about and share Python resources!
/r/Python
https://redd.it/12unks8
Reddit
r/Python on Reddit: Saturday Daily Thread: Resource Request and Sharing! Daily Thread
Posted by u/Im__Joseph - 1 vote and no comments
Django WebAuthn Support?
Are there any production ready standalone webauthn django libraries available?
I'd like to offer hardware token 2FA support but would like to use a trusted library rather than writing everything from scratch and worrying about potential security vulnerabilities.
/r/django
https://redd.it/12ur8px
Are there any production ready standalone webauthn django libraries available?
I'd like to offer hardware token 2FA support but would like to use a trusted library rather than writing everything from scratch and worrying about potential security vulnerabilities.
/r/django
https://redd.it/12ur8px
Reddit
r/django on Reddit: Django WebAuthn Support?
Posted by u/Moleventions - 8 votes and 4 comments
Django templates in the frontend
Hi, do you recommend to use Django templates in the frontend instead of using react JS with libraries like these ones:
https://github.com/holasoftware/djangotemplateenginejs
https://github.com/chrisdickinson/plate
https://github.com/mozilla/nunjucks
https://github.com/cloudratha/djanjucks
/r/django
https://redd.it/12uts9x
Hi, do you recommend to use Django templates in the frontend instead of using react JS with libraries like these ones:
https://github.com/holasoftware/djangotemplateenginejs
https://github.com/chrisdickinson/plate
https://github.com/mozilla/nunjucks
https://github.com/cloudratha/djanjucks
/r/django
https://redd.it/12uts9x
GitHub
GitHub - holasoftware/djangotemplateenginejs: Django templates in javascript. Render all your django templates in the frontend.
Django templates in javascript. Render all your django templates in the frontend. - GitHub - holasoftware/djangotemplateenginejs: Django templates in javascript. Render all your django templates in...
MenuScript - Run Python Scripts from the MacOS menubar
I want to introduce you to a personal passion project I've built called MenuScript.
https://i.redd.it/k8mcrimzpcva1.gif
What is it?
MenuScript is an Open Source application for MacOS which allows you to run your must have Python Scripts from the menubar. MenuScript needs to know 3 things about the script you want to run, 1. The name (which can be anything), 2. The absolute path to the script e.g. 'user/name/folder/main.py' 3. The absolute path to the python executable in your virtual environment.
I built MenuScript because I've always found it somewhat annoying that running Python scripts requires working in the command line. Additionally I hate that I have to activate my venv to run my scripts since I don't install all my packages globally. For some of my more frequent scripts I just wanted to be able to point and shoot.
To build the app I used rumps and python, and compiled with py2app. Source is available in the repo, and you can download the .app file by visiting the releases page.
How it works?
MenuScript uses subprocess to pass a bash script that activates the venv for your target script, and then runs that script with the relevant dependencies. You can also use it without a venv
/r/Python
https://redd.it/12ut616
I want to introduce you to a personal passion project I've built called MenuScript.
https://i.redd.it/k8mcrimzpcva1.gif
What is it?
MenuScript is an Open Source application for MacOS which allows you to run your must have Python Scripts from the menubar. MenuScript needs to know 3 things about the script you want to run, 1. The name (which can be anything), 2. The absolute path to the script e.g. 'user/name/folder/main.py' 3. The absolute path to the python executable in your virtual environment.
I built MenuScript because I've always found it somewhat annoying that running Python scripts requires working in the command line. Additionally I hate that I have to activate my venv to run my scripts since I don't install all my packages globally. For some of my more frequent scripts I just wanted to be able to point and shoot.
To build the app I used rumps and python, and compiled with py2app. Source is available in the repo, and you can download the .app file by visiting the releases page.
How it works?
MenuScript uses subprocess to pass a bash script that activates the venv for your target script, and then runs that script with the relevant dependencies. You can also use it without a venv
/r/Python
https://redd.it/12ut616
GitHub
GitHub - mubranch/menuscript
Contribute to mubranch/menuscript development by creating an account on GitHub.
Running Linux scripts to update cloud servers - Production Environment: Ubuntu 20.04
Hello All...
so we manage multiple cloud servers( 50+) for clients. And as things goes - sometimes we need to run upgrades on the system...i.e. database backup failed...so we need to manually redo the backup which means - we have to notify the client that the backup failed...schedule downtime....etc...
we a small company - and most of the processes are documented....documented processes means that non-technical people can follow the instructions to the letter..as such should be able to do it...we don't use Ansible.....(too technical for some support staff)....
so I am thinking Jupyter allows for both documentation and execution of scripts.....
Has anyone here used Jupyter Notebooks in a production environment..to automate or simplify server management....
Any resources you can refer me to...would be appreciated....
/r/JupyterNotebooks
https://redd.it/12uw5up
Hello All...
so we manage multiple cloud servers( 50+) for clients. And as things goes - sometimes we need to run upgrades on the system...i.e. database backup failed...so we need to manually redo the backup which means - we have to notify the client that the backup failed...schedule downtime....etc...
we a small company - and most of the processes are documented....documented processes means that non-technical people can follow the instructions to the letter..as such should be able to do it...we don't use Ansible.....(too technical for some support staff)....
so I am thinking Jupyter allows for both documentation and execution of scripts.....
Has anyone here used Jupyter Notebooks in a production environment..to automate or simplify server management....
Any resources you can refer me to...would be appreciated....
/r/JupyterNotebooks
https://redd.it/12uw5up
I made a PyAutoGUI GUI, what do you think?
​
Demo
https://github.com/endrebodi/pyAutoGUI2
You select an option from the dropdown, click "Add", and the script is created line by line.
You can copy it later, or run it in the app itself.
What do you think, should I continue development?
/r/Python
https://redd.it/12uenpr
​
Demo
https://github.com/endrebodi/pyAutoGUI2
You select an option from the dropdown, click "Add", and the script is created line by line.
You can copy it later, or run it in the app itself.
What do you think, should I continue development?
/r/Python
https://redd.it/12uenpr
Intermittent django MySQL conection error
I recently used django for one of our projects! But recently after deploying it to production env ( deployed it on ec2 machines) , i'm intermittently getting few MySQL errors. We are using multi-threading in our views for some IO calls.
Following are the errors -
MySQLdb.OperationalError: (2005, "Unknown MySQL server host 'scalerv3.cluster-cefqnpdgdxcd.us-east-1.rds.amazonaws.com' (2)")
And
2013. Lost connection to MySQL server during query
I have kept connmaxage to 10 mins so that django doesn't tries to make alot of connection but somehow it's still making alot of connections
Would really need someone's help here and would like to know why this is happening!
Help me out here if someone has faced this earlier
/r/django
https://redd.it/12v1lte
I recently used django for one of our projects! But recently after deploying it to production env ( deployed it on ec2 machines) , i'm intermittently getting few MySQL errors. We are using multi-threading in our views for some IO calls.
Following are the errors -
MySQLdb.OperationalError: (2005, "Unknown MySQL server host 'scalerv3.cluster-cefqnpdgdxcd.us-east-1.rds.amazonaws.com' (2)")
And
2013. Lost connection to MySQL server during query
I have kept connmaxage to 10 mins so that django doesn't tries to make alot of connection but somehow it's still making alot of connections
Would really need someone's help here and would like to know why this is happening!
Help me out here if someone has faced this earlier
/r/django
https://redd.it/12v1lte
Reddit
r/django on Reddit: Intermittent django MySQL conection error
Posted by u/mohdey - No votes and no comments
Chat implementation
Guys any idea about implementing chat on django like realtime without redis .. only over https .
/r/django
https://redd.it/12u8yp2
Guys any idea about implementing chat on django like realtime without redis .. only over https .
/r/django
https://redd.it/12u8yp2
Reddit
r/django on Reddit: Chat implementation
Posted by u/sudo_nitesh - 4 votes and 8 comments
Where can I deploy websites that using python as a backend (web applications)
hello, I need a host that I can buy and use to deploy my web apps, the cheapest ever.
and if it possible that I deploy several webapps it would be amazing, as I need something to deploy all my projects on, and is this even possible?
/r/Python
https://redd.it/12v0d0e
hello, I need a host that I can buy and use to deploy my web apps, the cheapest ever.
and if it possible that I deploy several webapps it would be amazing, as I need something to deploy all my projects on, and is this even possible?
/r/Python
https://redd.it/12v0d0e
Reddit
r/Python on Reddit: Where can I deploy websites that using python as a backend (web applications)
Posted by u/YukkiiCode - 90 votes and 75 comments