Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Saturday Daily Thread: Resource Request and Sharing!

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/liocry
Giveaway: My ebooks on Python Intro and Regular Expressions are free until Feb 17

​

https://preview.redd.it/h27dtp0hg5h61.png?width=397&format=png&auto=webp&s=114fffd7030d156d234801934ecf26c0f70d2080

Hello!

I recently self-published my ebook titled "**100 Page Python Intro**". This book is a short, introductory guide for the Python programming language suited **for those who have prior experience with another programming language**. To celebrate, I'm giving away several of my books for FREE until 17 Feb, 2021

# Ebook links

* 100 Page Python Intro
* [https://leanpub.com/100pagepythonintro](https://leanpub.com/100pagepythonintro)
* [https://gumroad.com/l/100pagepythonintro](https://gumroad.com/l/100pagepythonintro)
* Python re(gex)?
* [https://leanpub.com/py\_regex](https://leanpub.com/py_regex)
* [https://gumroad.com/l/py\_regex](https://gumroad.com/l/py_regex)
* Magical one-liners bundle
* [https://leanpub.com/b/oneliners](https://leanpub.com/b/oneliners)
* [https://gumroad.com/l/oneliners](https://gumroad.com/l/oneliners)

# Web version and GitHub repo

You can also read the book online here: [https://learnbyexample.github.io/100\_page\_python\_intro/introduction.html](https://learnbyexample.github.io/100_page_python_intro/introduction.html)

​

The [https://github.com/learnbyexample/100\_page\_python\_intro](https://github.com/learnbyexample/100_page_python_intro) repo has program/example files, markdown source and other details about the book.

# Feedback

Hope you find my books useful and fun to learn from. As always, I'd highly appreciate your feedback. Please do let me know if you spot any error or typo. Happy learning :)

/r/Python
https://redd.it/liqfpn
Newbie to coding

Hey y'all, im currently learning how to code, im taking AP computer science in school, buts in not very helpful. I know how to code some things, but not a lot, im just searching for some help, and by help just some coding tips and scripts made by y'all to study and so I can learn and understand how to code those things myself.

/r/Python
https://redd.it/litsgp
Utf-8 error

I have wrote print(“xxx”) on a folder at visual studio, then i wanted to print it at powershell. I wrote python foldername.py but it says “Non-Utf-8 code starting with '\xff' in file C:/users... on line 1, but no encoding declared” how can i solve this problem?

/r/Python
https://redd.it/liwpj0
Intermediate Django Learning

Hello all, I’m looking for advice. I’ve learned the basics of both Django and Node/Express/Mongodb. I want to get more advanced, and python is my main language, so I wanted to continue with Django.

My problem comes with higher level concepts like middleware, cookies, and more (I don’t know what I don’t know), but I cannot find any tutorials or books for getting good at Django intermediate topics. Can anyone recommend any? I’ve found a bunch of tutorials for the JS stacks, but none for Django, and if none really exist I have to continue with JS.

If anyone has any links or tutorials (I’m partial to Udemy courses but have love for books and other types of resources), please let me know, or let me know if this is a bad question for some reason. Thanks in advance!

/r/djangolearning
https://redd.it/lit0zf
Quick question about injection vulnerability

I'm very new to this framework so this is probably an easy question. Somehow hard to google, though.

Do I have to worry about injections when using render_template with user input? Let's say I have an index.html file with a <p>Hello { name }</p> section, and then use

return render_template('index.html', name=request.json['name'])

on POST requests.

/r/flask
https://redd.it/lj030k
Django Relationship



Please can anyone help me with this?

I’ve created two models to send data to my database.

A programmer model that stores the values of a programmer like name and age with other stuff.

Then another model that stores the code a programmer writes.

I’ve created the templates for both models - details and everything.

I want to be able to give users the ability to click on a programmer name then see the codes he’s written, note the programmer model is a foreign key on the code model.

How do I achieve this, it’s in Django 🙏.

/r/djangolearning
https://redd.it/liy701
Modern ttk theme

&#x200B;

Azure theme for ttk

Hi!

I just hate the look of tkinter and the built-in themes of ttk are ugly too, so i made my own ttk theme in beautiful azure and gray colors. Check it out on GitHub!

/r/Python
https://redd.it/liytrm
Corona Virus UK dashboard powered by Flask

I just found a link to the Public Health England Corona Virus Dashboard on github ( from /r/CoronavirusUK ). It looks like the core of the code is in Flask. https://coronavirus.data.gov.uk/

https://github.com/publichealthengland/coronavirus-dashboard-frontend-server/blob/master/requirements.txt

/r/flask
https://redd.it/lj0wt1
Folders structure for hexagonal architecture in Flask

Hi guys, I have been reading the Leonardo Giordani book about Clean Architecture and I want to start building some app with python and Flask, my doubt is how I can organize my folders, is there any standard way to do it? Thanks in advance

/r/flask
https://redd.it/lizetu
Spend 1 minute a day to improve your Python skills

I have a youtube channel called ProgrammingWithYash where I publish a short Python tutorial every day. My goal is to teach a common pattern or technique in under 60 seconds.

I try to be respectful of the viewers time and make the videos terse and clear with as little unnecessary fluff as possible. The content is mostly aimed at beginners, I hope it can help some of you to get into the habit of learning something new every day.

As I'm just starting out with this youtube thing, I'd love to hear your feedback regarding the format, content, anything... (topic suggestions are highly appreciated as well).

/r/Python
https://redd.it/lj0t0z
Sunday Daily Thread: What's everyone working on this week?

Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.

/r/Python
https://redd.it/ljcnj2
connecting Vue/React with django

im working on a blog project with a simple template , and after i finish it i wanna connect it to a front end template using vue , how i do that ? i will have just to import vue files inside template or i should convert my blog to and api ? [im new in django i have only basics\]

/r/django
https://redd.it/ljd1os
So I Accidentally Made a (Harmless) Virus...

I was messing around with python (specifically pynput) and got bored, and thought "wouldn't it be cool if I made a virus?" Now, when I thought this, I was doing purely for shits and giggles, and I had/have no harmful intent.

So the virus consists of a basic forever loop, which just takes control of your mouse, and prevents you from moving. Really basic, I know. So I run the file, and to my surprise is works! Except I didn't implement a fail safe, so nothing would work to stop the program. I obviously couldn't use task manager, and Alt + F4 didn't work. So I ended up just turning off my PC lmao. I wanting to see if my computer would detect it as a virus, and it sure did. It didn't delete it, but it did warn me, which is reassuring but also funny.

But yeah I didn't send the code to anyone or anything, just a harmless thing that took me less than 5 minutes.

/r/Python
https://redd.it/ljghmz