Python on tablet?
I have damaged my laptops hard disk and difficult to operate it in a remote area as there are no repair shops nearby. But i need to learn programming and dsa in 2 months. Can I code on my laptop? Any online softwares for it?
/r/Python
https://redd.it/1l5tscy
I have damaged my laptops hard disk and difficult to operate it in a remote area as there are no repair shops nearby. But i need to learn programming and dsa in 2 months. Can I code on my laptop? Any online softwares for it?
/r/Python
https://redd.it/1l5tscy
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Sunday Daily Thread: What's everyone working on this week?
# Weekly Thread: What's Everyone Working On This Week? π οΈ
Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!
## How it Works:
1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.
## Guidelines:
Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.
## Example Shares:
1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!
Let's build and grow together! Share your journey and learn from others. Happy coding! π
/r/Python
https://redd.it/1l5yvhd
# Weekly Thread: What's Everyone Working On This Week? π οΈ
Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!
## How it Works:
1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.
## Guidelines:
Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.
## Example Shares:
1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!
Let's build and grow together! Share your journey and learn from others. Happy coding! π
/r/Python
https://redd.it/1l5yvhd
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Globally Disable Foreign Keys in Django
https://www.pixelstech.net/article/1749100094-globally-disable-foreign-keys-in-django
/r/django
https://redd.it/1l61suh
https://www.pixelstech.net/article/1749100094-globally-disable-foreign-keys-in-django
/r/django
https://redd.it/1l61suh
www.pixelstech.net
Globally Disable Foreign Keys in Django
Django ORM is my favorite ORM, as it comes with a complete database management solution out of the box. However, it doesnβt always adapt well in certain companiesβfor example, see how Djan
Audited SSS (shamir shared secret) code?
Iβm currently looking for audited implementations of Shamirβs Secret Sharing (SSS). I recall coming across a dual-audited Java library on GitHub some time ago, but unfortunately, I canβt seem to locate it again.
Are there any audited Python implementations of SSS available? I've searched extensively but haven't been able to find any.
Can anyone found some? I'm thinking about: https://github.com/konidev20/pyshamir but I don't know.
/r/Python
https://redd.it/1l5xtz5
Iβm currently looking for audited implementations of Shamirβs Secret Sharing (SSS). I recall coming across a dual-audited Java library on GitHub some time ago, but unfortunately, I canβt seem to locate it again.
Are there any audited Python implementations of SSS available? I've searched extensively but haven't been able to find any.
Can anyone found some? I'm thinking about: https://github.com/konidev20/pyshamir but I don't know.
/r/Python
https://redd.it/1l5xtz5
GitHub
GitHub - konidev20/pyshamir: Shamir key Split and Combine methods.
Shamir key Split and Combine methods. . Contribute to konidev20/pyshamir development by creating an account on GitHub.
Django CSS Production not loading
Refused to apply style from because its MIME type ('text/html') is not a supported stylesheet MIME
settings.py
BASEDIR = Path(file).resolve().parent.parent
STATICURL = '/static/'
STATICROOT = BASEDIR / 'staticfiles'
STATICFILESDIRS = [
BASEDIR / 'myapp' / 'static',
]
base.html
<link rel="stylesheet" href="{% static 'styles.css' %}" />
I also am running
python manage.py collectstatic --noinput
So when I am in production its picking up nothing in my static folder I'm so confused help please!
/r/django
https://redd.it/1l5vhcs
Refused to apply style from because its MIME type ('text/html') is not a supported stylesheet MIME
settings.py
BASEDIR = Path(file).resolve().parent.parent
STATICURL = '/static/'
STATICROOT = BASEDIR / 'staticfiles'
STATICFILESDIRS = [
BASEDIR / 'myapp' / 'static',
]
base.html
<link rel="stylesheet" href="{% static 'styles.css' %}" />
I also am running
python manage.py collectstatic --noinput
So when I am in production its picking up nothing in my static folder I'm so confused help please!
/r/django
https://redd.it/1l5vhcs
Reddit
From the django community on Reddit
Explore this post and more from the django community
Help Django ModuleNotFoundError when deploying to Render
I'm struggling with a deployment issue on Render with my Django project.I'm struggling with a deployment issue on Render with my Django project. When deploying, I get
Project Structure:
portfolio_app/
βββ django_portfolio_app/
βββ portfolio_app/
β βββ __init__.py
β βββ settings.py
β βββ urls.py
β βββ wsgi.py
βββ accounts/
βββ projects/
βββ resume/
βββ forum/
βββ theme/
β βββ static/
βββ manage.py
I did specify in the render deployment settings that django_portfolio_app is the root directory. No idea where to go from now on, as I'm stuck on this error since yesterday. Thanks for any advice and feedback
/r/django
https://redd.it/1l5t4wr
I'm struggling with a deployment issue on Render with my Django project.I'm struggling with a deployment issue on Render with my Django project. When deploying, I get
ModuleNotFoundError: No module named 'accounts' Project Structure:
portfolio_app/
βββ django_portfolio_app/
βββ portfolio_app/
β βββ __init__.py
β βββ settings.py
β βββ urls.py
β βββ wsgi.py
βββ accounts/
βββ projects/
βββ resume/
βββ forum/
βββ theme/
β βββ static/
βββ manage.py
I did specify in the render deployment settings that django_portfolio_app is the root directory. No idea where to go from now on, as I'm stuck on this error since yesterday. Thanks for any advice and feedback
/r/django
https://redd.it/1l5t4wr
Reddit
From the django community on Reddit
Explore this post and more from the django community
Project RCPTelegram β A Telegram Bot to Remotely Control Remotely your PC
---
Project RCPTelegram β A Telegram Bot to Remotely Control Your PC (Webcam, Screen, Keylogger, Pranks & More)
---
π§ What My Project Does
RCPTelegram is a Telegram bot that lets you remotely control your PC via chat commands. Some of the features include:
πΈ Streaming your webcam and screen (via ngrok tunnels)
πΌοΈ Taking screenshots and webcam photos
β¨οΈ Keylogger
πΆ Getting saved Wi-Fi passwords
π Grabbing your public IP
π Setting volume and managing output devices
π Pranks and other fun tools
π© Many system automation commands (power, sleep, lock, etc.)
All features are accessible from a single Telegram chat β no GUI needed.
---
π― Target Audience
This is not meant for production β it's a toy/educational project designed to explore remote PC control using Python and Telegram. Itβs great for learning purposes, automation experiments, or building your own personal remote assistant.
---
βοΈ Comparison to Existing Tools
Unlike commercial tools like TeamViewer or AnyDesk:
π’ This works headlessly via Telegram
π οΈ Fully scriptable and open-source
π Uses ngrok for quick and easy tunneling
π Has playful features (like pranks) you wonβt find in standard tools
π§© You can modify and extend it however you like
---
ποΈ Links
Bot Code: https://github.com/RiccardoZappitelli/RCPTelegram
GUI Builder: https://github.com/RiccardoZappitelli/RCPTMaker
---
Let me know what features youβd add or how you'd improve it. Iβm also planning to split the code into multiple
/r/Python
https://redd.it/1l69934
---
Project RCPTelegram β A Telegram Bot to Remotely Control Your PC (Webcam, Screen, Keylogger, Pranks & More)
---
π§ What My Project Does
RCPTelegram is a Telegram bot that lets you remotely control your PC via chat commands. Some of the features include:
πΈ Streaming your webcam and screen (via ngrok tunnels)
πΌοΈ Taking screenshots and webcam photos
β¨οΈ Keylogger
πΆ Getting saved Wi-Fi passwords
π Grabbing your public IP
π Setting volume and managing output devices
π Pranks and other fun tools
π© Many system automation commands (power, sleep, lock, etc.)
All features are accessible from a single Telegram chat β no GUI needed.
---
π― Target Audience
This is not meant for production β it's a toy/educational project designed to explore remote PC control using Python and Telegram. Itβs great for learning purposes, automation experiments, or building your own personal remote assistant.
---
βοΈ Comparison to Existing Tools
Unlike commercial tools like TeamViewer or AnyDesk:
π’ This works headlessly via Telegram
π οΈ Fully scriptable and open-source
π Uses ngrok for quick and easy tunneling
π Has playful features (like pranks) you wonβt find in standard tools
π§© You can modify and extend it however you like
---
ποΈ Links
Bot Code: https://github.com/RiccardoZappitelli/RCPTelegram
GUI Builder: https://github.com/RiccardoZappitelli/RCPTMaker
---
Let me know what features youβd add or how you'd improve it. Iβm also planning to split the code into multiple
/r/Python
https://redd.it/1l69934
GitHub
GitHub - RiccardoZappitelli/RCPTMaker: RCPepTelegram creator
RCPepTelegram creator. Contribute to RiccardoZappitelli/RCPTMaker development by creating an account on GitHub.
Anyone successfully hosted on Plannethoster?
Trying to host my first Django/HTML project on Plannethoster as I'm with them for other projects, so thought how hard can it be π΅βπ«
Now I've read though the docs on the site about python and Django project, but I seem to be missing something or they have changed something π€· an their support support are not very helpful with it.
From what I've read you need to create the python app and navigate to via terminal, then in stall Django and a Django app, or instead of the Django app you upload you own.
But there's nothing on does it need to be in the app folder you created for the python app before, or can it be in a subfolder? Do I have to upload from their file manager or can I do it from git?
I'm sure there's more questions after this as it seems very convoluted in the setting up.
Thanks for your help and your time, if you have any knowledge on this.
/r/django
https://redd.it/1l69zp9
Trying to host my first Django/HTML project on Plannethoster as I'm with them for other projects, so thought how hard can it be π΅βπ«
Now I've read though the docs on the site about python and Django project, but I seem to be missing something or they have changed something π€· an their support support are not very helpful with it.
From what I've read you need to create the python app and navigate to via terminal, then in stall Django and a Django app, or instead of the Django app you upload you own.
But there's nothing on does it need to be in the app folder you created for the python app before, or can it be in a subfolder? Do I have to upload from their file manager or can I do it from git?
I'm sure there's more questions after this as it seems very convoluted in the setting up.
Thanks for your help and your time, if you have any knowledge on this.
/r/django
https://redd.it/1l69zp9
Reddit
From the django community on Reddit
Explore this post and more from the django community
π¬ MovieHit.online - A Django-powered movie discovery web app I built
https://redd.it/1l6j2rs
@pythondaily
https://redd.it/1l6j2rs
@pythondaily
Reddit
From the django community on Reddit: π¬ MovieHit.online - A Django-powered movie discovery web app I built
Explore this post and more from the django community
Deploy Django on Render
Ever Wanted to Deploy Django to Render?
The tutorial below demonstrates how you can deploy Django to render for free and also have a PostgreSQL database at neon and store your media assets at cloudinary, all for free.
Check it out - simply legendary!
https://youtu.be/VUFg\_ov6b\_4?si=DeOSnXOFmTv6SkfK
/r/django
https://redd.it/1l6i6sm
Ever Wanted to Deploy Django to Render?
The tutorial below demonstrates how you can deploy Django to render for free and also have a PostgreSQL database at neon and store your media assets at cloudinary, all for free.
Check it out - simply legendary!
https://youtu.be/VUFg\_ov6b\_4?si=DeOSnXOFmTv6SkfK
/r/django
https://redd.it/1l6i6sm
YouTube
How to Deploy a Django Web App on Render for Free (with Neon Postgres & Cloudinary)
Learn how to deploy your Django web app for free using Render for hosting, Neon for the PostgreSQL database, and Cloudinary to store and manage your media files. This guide walks you through each step so you can get your project online quickly and easily.β¦
Docker container running not able to reach localhost
Hi All,
There is an issue that I am facing where I am trying to run the application on docker container. Docker build works absolutely fine. The container is running as well but I am not able to reach the application.
Dockerfile
Docker Run Command
docker build -t flask-smorest-api .
docker run -dp 5005:5000 -w /app -v "$(pwd):/app" flask-smorest-api
Container Logs
Serving Flask app 'app'
Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
Running on all addresses (0.0.0.0)
Running on http://127.0.0.1:5005β
Running on http://172.17.0.2:5005β
Press CTRL+C to quit
Restarting with stat
Debugger is active!
Debugger PIN: 502-466-638
When i am trying to access the endpoint from POSTMAN there is
/r/flask
https://redd.it/1l6hapd
Hi All,
There is an issue that I am facing where I am trying to run the application on docker container. Docker build works absolutely fine. The container is running as well but I am not able to reach the application.
Dockerfile
FROM python:3.10 EXPOSE 5000 WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir --upgrade -r requirements.txt COPY . . CMD ["flask", "run", "--host","0.0.0.0"]Docker Run Command
docker build -t flask-smorest-api .
docker run -dp 5005:5000 -w /app -v "$(pwd):/app" flask-smorest-api
Container Logs
Serving Flask app 'app'
Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
Running on all addresses (0.0.0.0)
Running on http://127.0.0.1:5005β
Running on http://172.17.0.2:5005β
Press CTRL+C to quit
Restarting with stat
Debugger is active!
Debugger PIN: 502-466-638
When i am trying to access the endpoint from POSTMAN there is
/r/flask
https://redd.it/1l6hapd
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Why is there no python auto-instrument module for open telemetry ?
Hi all,
I use open telemetry auto-instrumentors to get insights of my python application. These auto-instrumentors will instrument particular modules:
* [fast-api auto instrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-fastapi)
* [openai auto instrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation-genai/opentelemetry-instrumentation-openai-v2)
* etc...
As far as I understand, these modules will create spans for different events (fastapi request, openai llm call etc..), adding inputs and outputs of event as span attributes
# My question:
Why isn't there a python auto instrumentor that will create a span for each function, adding arguments and return values as attributes ?
Is it a bad idea to do such auto instrumentor ? Is it just not feasible ?
## Edit :
For those who are interested, I have coded an auto-instrumentor that will automatically create a span for the functions that are called **in user code** (not in imported modules etc...)
Check it ou there [repo](https://github.com/le-codeur-rapide/opentelemetry-instrumentation-python/tree/main/examples)
/r/Python
https://redd.it/1l6crs2
Hi all,
I use open telemetry auto-instrumentors to get insights of my python application. These auto-instrumentors will instrument particular modules:
* [fast-api auto instrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-fastapi)
* [openai auto instrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation-genai/opentelemetry-instrumentation-openai-v2)
* etc...
As far as I understand, these modules will create spans for different events (fastapi request, openai llm call etc..), adding inputs and outputs of event as span attributes
# My question:
Why isn't there a python auto instrumentor that will create a span for each function, adding arguments and return values as attributes ?
Is it a bad idea to do such auto instrumentor ? Is it just not feasible ?
## Edit :
For those who are interested, I have coded an auto-instrumentor that will automatically create a span for the functions that are called **in user code** (not in imported modules etc...)
Check it ou there [repo](https://github.com/le-codeur-rapide/opentelemetry-instrumentation-python/tree/main/examples)
/r/Python
https://redd.it/1l6crs2
GitHub
opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-fastapi at main Β· open-telemetry/opentelemetry-pythonβ¦
OpenTelemetry instrumentation for Python modules. Contribute to open-telemetry/opentelemetry-python-contrib development by creating an account on GitHub.
Monday Daily Thread: Project ideas!
# Weekly Thread: Project Ideas π‘
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project ideaβbe it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1l6qq6d
# Weekly Thread: Project Ideas π‘
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project ideaβbe it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1l6qq6d
Real world flask projects
Hey. Iβm learning flask as of now and tutorials focus on simpler task/projects that donβt show using of flask on its full extend. Additionally to that each tutorial skips or copy pastes all other things that arenβt of directional relation to flask. It is ok I guess since they are trying to teach me flask, but would want to see a real flask project to understand how devs use it in real world applications and how they couple it with other tools/frameworks. Could anyone share a GitHub link where I could find it?
/r/Python
https://redd.it/1l6g3eg
Hey. Iβm learning flask as of now and tutorials focus on simpler task/projects that donβt show using of flask on its full extend. Additionally to that each tutorial skips or copy pastes all other things that arenβt of directional relation to flask. It is ok I guess since they are trying to teach me flask, but would want to see a real flask project to understand how devs use it in real world applications and how they couple it with other tools/frameworks. Could anyone share a GitHub link where I could find it?
/r/Python
https://redd.it/1l6g3eg
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Looking for senior python API developer
Looking for a remote Python developer to build and maintain APIs (Django), automate SSL checks, and scale backend systems.
β’ π Stack: Python, Django, FastAPI, Docker, PostgreSQL, ASB
β’ π Fully remote (worldwide)
β’ π° Competitive pay + equity potential
DM for details
/r/Python
https://redd.it/1l6u1ig
Looking for a remote Python developer to build and maintain APIs (Django), automate SSL checks, and scale backend systems.
β’ π Stack: Python, Django, FastAPI, Docker, PostgreSQL, ASB
β’ π Fully remote (worldwide)
β’ π° Competitive pay + equity potential
DM for details
/r/Python
https://redd.it/1l6u1ig
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Deploying to VPS , Postgres slowdown
Hi everyone,
I'm using django-debug-toolbar to look at my query times on my local machine and i'm trying to optimize it as best i can so i keep my load times as low as possible.
On my local machine debug-toolbar states '12 queries in 2.73ms'.
I ran the same settings, same project, same DB copy on a \~25 EUR VPS on hetzner and i got this: '12 queries ran in 28.1ms'.
Now, my logic is that if i have the webserver (django+nginx) and the database (postgres) on the same machine, then the query times should be relatively close, since django communicates with the DB on localhost, so no reason for a slowdown.
I get that the final HTML will be sent much slower since the server is \~500km from me and not 50cm.
Again, Postgres and Django is on the same machine, and the same query takes 10x as much time for some reason.
Is my logic wrong or am i doing something very wrong when deploying to a VPS?
/r/django
https://redd.it/1l6oy53
Hi everyone,
I'm using django-debug-toolbar to look at my query times on my local machine and i'm trying to optimize it as best i can so i keep my load times as low as possible.
On my local machine debug-toolbar states '12 queries in 2.73ms'.
I ran the same settings, same project, same DB copy on a \~25 EUR VPS on hetzner and i got this: '12 queries ran in 28.1ms'.
Now, my logic is that if i have the webserver (django+nginx) and the database (postgres) on the same machine, then the query times should be relatively close, since django communicates with the DB on localhost, so no reason for a slowdown.
I get that the final HTML will be sent much slower since the server is \~500km from me and not 50cm.
Again, Postgres and Django is on the same machine, and the same query takes 10x as much time for some reason.
Is my logic wrong or am i doing something very wrong when deploying to a VPS?
/r/django
https://redd.it/1l6oy53
Reddit
From the django community on Reddit
Explore this post and more from the django community