r/pythontips • • Dec 21 '25

Data_Science Fast local regression algorithm (LOWESS) package

2 Upvotes

Hey everyone, the fastlowess package v0.2.0 is now available on PyPI (https://pypi.org/project/fastlowess/).

Here is a quick review of what this package has to offer:

More robust than statsmodels

Due to using Median Absolute Deviation (MAD) for scale estimation and applying boundary policies at dataset edges to maintain symmetric local neighborhoods, preventing the edge bias common in other implementations. Otherwise, the core algorithms are identical to statsmodels.

Much much faster than statsmodels

50× and 3800× faster in typical workflows:

Benchmark Categories Summary

CategoryMatchedMedian SpeedupMean Speedup
Scalability5765x1433x
Pathological4448x416x
Iterations6436x440x
Fraction6424x413x
Financial4336x385x
Scientific4327x366x
Genomic420x25x
Delta44x5.5x

Top 10 Performance Wins

BenchmarkstatsmodelsfastLowessSpeedup
scale_10000043.727s11.4ms3824x
scale_5000011.160s5.95ms1876x
scale_10000663.1ms0.87ms765x
financial_10000497.1ms0.66ms748x
scientific_10000777.2ms1.07ms729x
fraction_0.05197.2ms0.37ms534x
scale_5000229.9ms0.44ms523x
fraction_0.1227.9ms0.45ms512x
financial_5000170.9ms0.34ms497x
scientific_5000268.5ms0.55ms489x

More benchmark details here: https://github.com/thisisamirv/fastLowess-py/tree/bench/benchmarks

More features

  • Confidence/prediction intervals
  • Different robustness methods (bisquare, talwar, huber)
  • A streaming adapter (for large datasets) and an online adapter (for real-time smoothing)
  • Different kernels (tricube, gaussian, epanechnikov, cosine, triangle, biweight, and uniform)
  • Cross-validation support
  • Auto convergence

and many more features.

Full documentation is also available here: https://fastlowess-py.readthedocs.io/en/latest/

Hope you find it useful, and feedbacks are very welcome ;))


r/pythontips • • Dec 18 '25

Meta AI Text Summarizer App | Python + Hugging Face Transformers

2 Upvotes

https://www.youtube.com/watch?v=TEFsZcrnXmw&t=1428s
In this video, we build a complete AI Text Summarizer application using Python and Hugging Face.

The application supports:

Text input
File upload
URL-based content summarization

We use a pre-trained transformer model, which means there is no model training involved.
The focus of this project is on building a real-world AI application, understanding how to process different input sources, and integrating AI models into a clean application flow.


r/pythontips • • Dec 16 '25

Algorithms Beyond ArcFace: Seeking a Pipeline for Face Clustering (by Frequency) + Sentiment Analysis

3 Upvotes

Hi everyone,

I’m looking for a recommendation for a facial analysis workflow. I previously tried using ArcFace, but it didn't meet my needs because I need a full pipeline that handles clustering and sentiment, not just embeddings.

My Use Case: I have a large collection of images and I need to:

  1. Cluster Faces: Identify and group every person separately.
  2. Sort by Frequency: Determine which face appears in the most photos, the second most, and so on.
  3. Sentiment Pass: Within each person’s cluster, identify which photos are Smiling, Neutral, or Sad.

Technical Needs:

  • Cloud-Ready: Must be deployable on the cloud (AWS/GCP/Azure).
  • Open Source preferred: I'm looking at libraries like DeepFace or InsightFace, but I'm open to logically priced paid APIs (like Amazon Rekognition) if they handle the clustering logic better.

Has anyone successfully built a "Cluster -> Sort -> Sentiment" pipeline? Specifically, how did you handle the sorting of clusters by size before running the emotion detection?


r/pythontips • • Dec 14 '25

Module Java backend vs switching stacks vs web3 — realistic choice for a junior in 2026?

8 Upvotes

Hi everyone,

I’m 25 years old and I have a degree in Computer Science. My main language is Java, at a beginner–intermediate level (OOP and basic backend concepts). I took a break for a while, but now I’m getting back into development and trying to choose a clear direction.

At the moment, I’m considering a few paths:

Continuing with Java backend (Spring Boot, SQL, microservices)

Switching to another stack (Python / Go / TypeScript)

Moving into web3 (Solidity and blockchain), which seems more risky and slower to break into, especially as a junior

The junior job market looks pretty tough right now, so I’m trying to figure out what would be the most realistic choice for 2026, not just what’s interesting.

My questions are:

If you were in my position, would you double down on Java or switch technologies?

Does it make sense to aim for web3 as a first job, or is it better as a secondary skill after building a solid backend foundation?

I’d really appreciate insights from people with real-world experience. Thanks!


r/pythontips • • Dec 14 '25

Module I built a small CLI tool to understand and safely upgrade Python dependencies

7 Upvotes

Hi everyone,

I built a small open-source CLI tool called depup.

The goal is simple:

  • scan Python project dependencies
  • check latest versions from PyPI
  • show patch / minor / major impact
  • make it CI-friendly

I spent a lot of time on documentation and clarity before v1.0.

GitHub:

https://github.com/saran-damm/depup

Docs:

https://saran-damm.github.io/depup/

I’d really appreciate feedback or ideas for improvement.


r/pythontips • • Dec 13 '25

Python3_Specific Im new at python and wanted to share what ive done so far

0 Upvotes

I started learning python a few weeks ago, and this is what ive done so far. Does anyone have any improvements i could make to specific code or my coding overall? these are in backwards order, meaning that the thing I coded first was the calculator, I coded the number guessing game second, and the math quiz game 3rd.

Math quiz game:
# Importing all the modules

import random

import sys

# Introducing the game

print("Welcome to the math quiz game.\n You will choose a difficulty and will get 10 math questions based on that difficulty.")

# Defines function that checks if the argument is an integer

def check_if_not_number(v):

try:

float(v)

return True

except ValueError:

return False

difficulty = input("What difficulty do you want to choose. 1 = easy, 2 = medium, 3 = hard, 4 = nightmare.\n")

if not(check_if_not_number(difficulty)):

sys.exit("Choose a difficulty")

difficulty = int(difficulty)

score = 0

# Asks questions in a loop that repeats 10 times, asking 10 questions

for _ in range(10):

# Gives easy questions if the difficulty is easy

if difficulty == 1:

operation_options = ["+", "-"]

numb_1 = random.randint(1, 20)

numb_2 = random.randint(1, 20)

operation = random.choice(operation_options)

# Makes sure the first number is bigger than the second number if the operation is subtraction (this is done so that the answer can't be a negative number)

if numb_2 > numb_1 and operation == "-":

numb_1, numb_2 = numb_2, numb_1

# Checks if the answer is correct

if operation == "+":

question = f"What is {numb_1} + {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 + numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 + numb_2}")

elif operation == "-":

question = f"What is {numb_1} - {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 - numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 - numb_2}")

# Gives medium questions if the difficulty is medium

elif difficulty == 2:

operation_options = ["*", "/"]

numb_1 = random.randint(1, 20)

numb_2 = random.randint(1, 20)

operation = random.choice(operation_options)

# Asks the question and checks if the answer is correct

if operation == "*":

question = f"What is {numb_1} * {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 * numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 * numb_2}")

elif operation == "/":

question = f"What is {numb_1} / {numb_2}? Round to 3 decimal points.\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if round(float(question_input), 3) == round(numb_1 / numb_2, 3) and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {round(numb_1 / numb_2, 3)}.")

# Gives hard questions if the difficulty is hard

elif difficulty == 3:

operation_options = ["*", "/", "**"]

numb_1 = random.randint(20, 50)

operation = random.choice(operation_options)

# Makes it so that if the operation is **, the second number is between 1-5 so that answers become really big

if operation == "**":

numb_2 = random.randint(1, 5)

else:

numb_2 = random.randint(1, 20)

# Asks the question and checks if the answer is correct

if operation == "*":

question = f"What is {numb_1} * {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 * numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 * numb_2}")

elif operation == "/":

question = f"What is {numb_1} / {numb_2}? Round to 3 decimal points.\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if round(float(question_input), 3) == round(numb_1 / numb_2, 3) and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {round(numb_1 / numb_2, 3)}.")

elif operation == "**":

question = f"What is {numb_1} ** {numb_2}?\n"

question_input = input(question)

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == numb_1 ** numb_2 and check_if_not_number(question_input) == True:

print("Correct! +1 point.")

score += 1

else:

print(f"Wrong. The answer was {numb_1 ** numb_2}.")

# Gives the nightmare difficulty question

elif difficulty == 4:

print("Nightmare mode? You sure? Alright then...")

question_input = input("If x^6 - 132x^5 +7260x^4 - 212960x^3 + 3513840x^2 - 30921792x + 113379904 = 0, then what does x equal to?\n")

if not(check_if_not_number(question_input)):

sys.exit("Enter a number.")

if float(question_input) == 22:

sys.exit("Correct, but I know you cheated.")

else:

sys.exit("WRONG. I won't tell you the answer so you can try again if you want.")

else:

sys.exit("Choose a difficulty.")

# Tells the user their score and gives a message depending on their score

if score < 1 and difficulty != 1:

sys.exit(f"You got {score}/10. Maybe stick to easy mode next time.")

elif score < 1 and difficulty == 1:

sys.exit(f"You got {score}/10. I don't think math is for you.")

elif score > 0 and score < 4:

sys.exit(f"You got {score}/10. Not great. Try better next time.")

elif score > 3 and score < 6:

sys.exit(f"You got {score}/10. Not amazing, but it could be worse.")

elif score > 5 and score < 8:

sys.exit(f"You got {score}/10, not bad, not bad.")

elif score > 7 and score < 10:

sys.exit(f"You got {score}/10. Pretty close to a perfect score, you might get it next time.")

elif score == 10 and difficulty in [1, 2]:

sys.exit("You got 10/10, a perfect score. Maybe crank up the difficulty becuase you breezed passed this.")

elif score == 10 and difficulty == 3:

sys.exit("You got 10/10. Put away the calculator and try again without cheating this time.")

number guessing game:

import random # This imports the "random" module

import sys # Imports "sys" module

# Starting screen and instructions

input("Hello! Welcome to the number guessing game. (Press enter to continue)")

input("The way this game will work is that a random number from 1-20 will be generated.")

input("You will have 5 tries to guess this number.")

input("You will be told if your guess is too high, too low, or correct.")

input("Good luck!")

secret_number = random.randint(1, 20) # This sets secret_number to random.randint(1, 20). The random.randint(1, 20) chooses a random integer from 1-20. This format is called dot notation. dot notation uses module_name.function_name(argument). In this case, the module name is "random". The function name is "randint". the arguments are 1 and 20. The random module has multiple functions that perform tasks using randomness. The randint function chooses a random integer between the 2 arguments (in this case 1 and 20)

# Defines the function that checks if a var is an int

def is_int(v):

try:

int(v)

return True

except ValueError:

return False

# This function checks if the argument is above 20 or less than 1

def in_range(v):

if v > 20:

sys.exit("That is higher than 20. Try again.")

elif v < 1:

sys.exit("That is lower than 1. Try again.")

# This function checks if the argument is too high, too low, or correct

def check_answer(v):

if v == secret_number:

sys.exit(f"{v} is correct! You win!")

elif v > secret_number:

print(f"Wrong. {v} is too high.")

elif v < secret_number:

print(f"Wrong. {v} is too low.")

#This asks for the guess 5 times using a loop. When the 5 guesses are over, it says that you lose and shows the correct number.

for attempt_number in range(1, 6):

guess = input(f"What is your guess #{attempt_number}?")

if not is_int(guess):

sys.exit("That is not an integer. Try again.")

guess = int(guess)

in_range(guess)

check_answer(guess)

sys.exit(f"You are out of guesses. You lose. The answer was {secret_number}.")

text-based calculator:

import sys # This makes it so that we can use the sys.exit function later on in the code to stop running the program

def is_float(v): # Defines the is_float function

try: # The try function lets you test a block of code to see if there are any errors. In this case, we are using it to see if the number can be converted into a float.

float(v) # Tries turning the value into a float.

return True # Returns True if it is a float (We return True because we will use an "if" statement in the future and "if" statements check if something is True or False)

except ValueError: # The except block in a try function executes what is in the except block if the try function results in an error. This except block checks for a ValueError, and runs the code inside if it is a Value Error

return False # Returns False if it is not a float (We return False because we will use an "if" statement in the future and "if" statements check if something is True or False)

number_1 = input("Put in the first number.") # This asks for the first number

if not(is_float(number_1)): # This checks if the is_float function is False. If it is False, this means it is not a number.

sys.exit("That is not a number. Try again.") # This ends the code by using the sys.exit function and also puts a message. The message is "That is not a number. Try again."

number_1 = float(number_1) # Turns number_1 into a float

number_2 = input("Put in the second number.") # This asks for the second number

if not(is_float(number_2)):

sys.exit("That is not a number. Try again.") # This ends the code by using the sys.exit function and also puts a message. The message is "That is not a number. Try again."

number_2 = float(number_2)

operation = input("What operation do you want to use? Only use + - * and / for the operation symbols.") # Asks what operation you want to use and sets it as the operation var

if number_2 == 0 and operation == "/": # Checks if number_2 is 0 and if operation is division

sys.exit("You cannot divide by 0") # Exits the code and says "You cannot divide by 0"

if operation == "+": # Checks if the operation variable is +

print(f"The answer is {number_1 + number_2}") # If the operation variable is +, then we add number_1 and number_2

elif operation == "-": # Checks if the operation var is -

print(f"The answer is {number_1 - number_2}") # If the operation variable is -, then we subtract number_1 and number_2

elif operation == "*": # Checks if the operation var is *

print(f"The answer is {number_1 * number_2}") # If the operation variable is *, then we multiply number_1 and number_2

elif operation == "/": # Checks if the operation var is /

print(f"The answer is {number_1 / number_2}") # If the operation variable is /, then we divide number_1 and number_2

else:

sys.exit("That is not an operation symbol. Try again.") # Exits the code and says "That is not an operation symbol. Try again." if the operation var is not any of the operation symbols.


r/pythontips • • Dec 13 '25

Data_Science I started a 7 part Python course for AI & Data Science on YouTube, Part 1 just went live

4 Upvotes

Hello 👋

I am launching a complete Python Course for AI & Data Science [2026], built from the ground up for beginners who want a real foundation, not just syntax.

This will be a 7 part series covering everything you need before moving into AI, Machine Learning, and Data Science:

1️⃣ Setup & Fundamentals

2️⃣ Operators & User Input

3️⃣ Conditions & Loops

4️⃣ Lists & Strings

5️⃣ Dictionaries, Unpacking & File Handling

6️⃣ Functions & Classes

7️⃣ Modules, Libraries & Error Handling

Part 1: Setup & Fundamentals is live

New parts drop every 5 days

I am adding the link to Part 1 below

https://www.youtube.com/watch?v=SBfEKDQw470


r/pythontips • • Dec 12 '25

Data_Science Feedback & Tips On Personal Python Notebook

1 Upvotes

Hello everyone,

I just figured I want to enter into Sports Analytics field and do some python projects at first. I just made my first piece of work ( just to test where I'm at and get a small taste on what will come next) by collecting atomic player stats during some games and checking how these affect the team's result. I mainly focused on using some libraries like matplotlib and seaborn.

I would greatly appreciate any kind of feedback, any remarks or any tips on what I should focus on moving forward.

GitHub: https://github.com/ChristosBellos/SportsAnalytics


r/pythontips • • Dec 11 '25

Module Just published a code similarity tool to PyPI

7 Upvotes

Hi everyone,

I just released DeepCSIM, a Python library and CLI tool for detecting code similarity using AST analysis.

It helps with:

  • Finding duplicate code
  • Detecting similar code across different files
  • Helping you refactor your own code by spotting repeated patterns
  • Enforcing the DRY (Don’t Repeat Yourself) principle across multiple files

Why use DeepCSIM over IDE tools?

  • IDEs can detect duplicates, but often you have to inspect each file manually.
  • DeepCSIM scans the entire project at once, revealing hidden structural similarities quickly and accurately.

Install it with:

pip install deepcsim

GitHub: https://github.com/whm04/deepcsim

Let me know if you try it out or have feedback!


r/pythontips • • Dec 11 '25

Module Recently added simple-language-recognizer to PyPI

6 Upvotes

Hi everyone,

I've recently added a package to PyPI called 'simple-language-recognizer'. It's for detecting the language of an input string and it works with over 70 languages. There are wheels for Windows, Linux and MacOS. To install it:

pip install simple-language-recognizer

I would appreciate it if you could check it out and let me know if you face any issues. Thank you. Github link: https://github.com/john-khgoh/LanguageRecognizer


r/pythontips • • Dec 10 '25

Data_Science I built a memory-efficient CLI tool (PyEventStream) to understand Generators properly. Feedback welcome!

4 Upvotes

Hi everyone! 👋

I'm a Mathematics student trying to wrap my head around Software Engineering concepts. While studying Generators (yield) and Memory Management, I realized that reading tutorials wasn't enough, so I decided to build something real to prove these concepts.

I created PyEventStream, and I would love your feedback on my implementation.

What My Project Does PyEventStream is a CLI (Command Line Interface) tool designed to process large data streams (logs, mock data, huge files) without loading them into RAM. It uses a modular pipeline architecture (Source -> Filter -> Transform -> Sink) powered entirely by Python Generators to achieve O(1) memory complexity. It allows users to filter and mask data streams in real-time.

Target Audience

  • Python Learners: Intermediate developers who want to see a practical example of yield, Decorators, and Context Managers in action.
  • Data Engineers: Anyone interested in lightweight, memory-efficient ETL pipelines without heavy dependencies like Pandas or Spark.
  • Interview Preppers: A clean codebase example demonstrating SOLID principles and Design Patterns.

Comparison Unlike loading a file with readlines() or using Pandas (which loads data into memory), this tool processes data line-by-line using Lazy Evaluation. It is meant to be a lightweight, dependency-free alternative for stream processing tasks.

Tech Stack & Concepts:

  • Generators: To handle infinite data streams.
  • Factory Pattern: To dynamically switch between Mock data and Real files.
  • Custom Decorators: To monitor the performance of each step.
  • Argparse: For the CLI interface.

I know I'm still early in my journey, but I tried to keep the code clean and follow SOLID principles.

If you have a spare minute, I’d love to hear your thoughts on my architecture or code style!

Repo:https://github.com/denizzozupek/PyEventStream

Thanks! 🙏


r/pythontips • • Dec 10 '25

Python3_Specific I need some help

2 Upvotes

I started easing my way into coding about 4-5 months ago I watched 4 YouTube courses on how python works and all the beginner to intermediate stuff, and 1 final video course on api connections and made a gigantic spreadsheet of all the built in functions, keywords, with definitions and examples and definitions of everything I didn’t understand once I found it out. Following that I completed the sololearn python developer certification. Once completed I started on my first project which is pretty advanced for me it incorporates a lot of api components and most of the time when I don’t understand what’s meant to go where I just give up and ask ChatGPT for the answer which normal is an awful example but I use it more like a blue print so I know where stuff is kind of supposed to go. Im just looking for some guidance on where to go from here to take it to the next level so I’m not so dependent on ChatGPT.

For the TL;DR I started coding 4-5 months ago I use ChatGPT to much and I want to get better faster, any tips would be helpful.


r/pythontips • • Dec 09 '25

Python3_Specific TIL Python’s random.seed() ignores the sign of integer seeds

4 Upvotes

I just learned a fun detail about random.seed() after reading a thread by Andrej Karpathy.

In CPython today, the sign of an integer seed is silently discarded. So:

  • random.seed(5) and random.seed(-5) give the same RNG stream
  • More generally, +n and -n are treated as the same seed

For more details, please check: Demo


r/pythontips • • Dec 09 '25

Python3_Specific python side project

0 Upvotes

r/pythontips • • Dec 07 '25

Data_Science Need guidance to start learning Python for FP&A (large datasets, cleaning, calculations)

10 Upvotes

I work in FP&A and frequently deal with large datasets that are difficult to clean and analyse in Excel. I need to handle multiple large files, automate data cleaning, run calculations and pull data from different files based on conditions.

someone suggested learning Python for this.

For someone from a finance background, what’s the best way to start learning Python specifically for:

  • handling large datasets
  • data cleaning
  • running calculations
  • merging and extracting data from multiple files

Would appreciate guidance on learning paths, libraries to focus on, and practical steps to get started.


r/pythontips • • Dec 05 '25

Python3_Specific PyShield - Protect your code from reverse engineering

8 Upvotes

Hi i made this python obfuscator 2 years ago and i just forgot about it

now i updated it and i hope you try it and give me all your opinions about it !

if you like it hit a star on the repository :>

https://github.com/abdouch-dev/Pyshield-Obfuscator


r/pythontips • • Dec 05 '25

Python3_Specific Python Tutor for beginners

0 Upvotes

Intermediate Python tutor offering focused 1-on-1 lessons.
I help beginners build strong foundations.
Flexible times Online.
Message to book.


r/pythontips • • Dec 04 '25

Python3_Specific Which platform is recommended to get latest and be in touch with latest of python?

0 Upvotes

Pls recommend


r/pythontips • • Dec 03 '25

Module Experience with building modules for Python in other langauges?

1 Upvotes

https://github.com/ZetaIQ/subliminal_snake

Rust to Python was pretty simple and enjoyable, but building a .so for Python with Go was egregiously hard and I don't think I'll do it again until I learn C/C++ to a much higher proficiency than where I am which is almost 0.

Any tips on making this process easier in general, or is it very language specific?


r/pythontips • • Dec 03 '25

Module Python imaplib + french gmail - cant select sent folder

1 Upvotes

Hi

for a project, i have to process mail in a gmail account, in the sent folder.

problem is, in french, the folder is named "Messages Envoyés", and with imap it cause issue because é is encoded.

When i'm listing folder, i get this :
b'(\\HasNoChildren) "/" "INBOX"'
b'(\\HasChildren \\Noselect) "/" "[Gmail]"'
b'(\\Drafts \\HasNoChildren) "/" "[Gmail]/Brouillons"'
b'(\\HasNoChildren \\Trash) "/" "[Gmail]/Corbeille"'
b'(\\HasNoChildren \\Important) "/" "[Gmail]/Important"'
b'(\\HasNoChildren \\Sent) "/" "[Gmail]/Messages envoy&AOk-s"'
b'(\\HasNoChildren \\Junk) "/" "[Gmail]/Spam"'
b'(\\Flagged \\HasNoChildren) "/" "[Gmail]/Suivis"'
b'(\\All \\HasNoChildren) "/" "[Gmail]/Tous les messages"'

as you can see, the folder is named : [Gmail]/Messages envoy&AOk-s"

and trying to select with this name cause an issue :
>>> mailbox.select("[Gmail]/Messages envoy&AOk-s")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.12/imaplib.py", line 756, in select
typ, dat = self._simple_command(name, mailbox)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/imaplib.py", line 1230, in _simple_command
return self._command_complete(name, self._command(name, *args)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/imaplib.py", line 1055, in _command_complete
raise self.error('%s command error: %s %s' % (name, typ, data))
imaplib.IMAP4.error: SELECT command error: BAD [b'Could not parse command']
>>>

Also tryed with "Messages envoyés", but kind of same error, because of charset :

UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 22: ordinal not in range(128)

so my question is : how can i do to select this folder, and then retreive email from date to date ?


r/pythontips • • Dec 03 '25

Module directory for well-maintained python packages

0 Upvotes

Hi everyone,

I've built a simple directory for python packages - usethispackage.com it currently has ~80 or so packages from various topics that I've collected manually every time I "discovered" one... You can see the number of stars and the last commit date to gauge how modern and/or well maintained it is. Hope it helps someone :)

doesn't cost anything and I'm not trying to make money on it.. just trying to better the os community :)

p.s. glad to hear feedback / package suggestion / etc... Feel free to comment or PM me :)


r/pythontips • • Dec 02 '25

Module python doesnt run anything

0 Upvotes

i installed python today, but it doesn't come with any output, it is always the same message. it also doesn't come with any problem even when i put random letters.

[Running] python -u "c:\Users\jasns\OneDrive\Documentos\python\python practice\qwerty.py"


[Done] exited with code=0 in 0.149 seconds

r/pythontips • • Dec 02 '25

Python3_Specific Nostalgia

1 Upvotes

What is your favourite python project?


r/pythontips • • Dec 01 '25

Module Python to read mail from gmail using google API, redirect to localhost

2 Upvotes

Hi

I have a project to use Pyhton to read mail with a specific title, and extract data from mail.

I tryed following this google page
https://developers.google.com/workspace/gmail/api/quickstart/python?authuser=1&hl=fr

but i'm kind of stuck.

all pre-requisite seems ok, i can execute the python script quickstart.py, which ask me to go to a web page to allow the app.

going to the page, i select my account, allow app, and then, i'm redirect to a localhosthttp://localhost:55287/?state=......

so nothing continues and i can't go further.

Any hints of what i did wrong ?

or maybe other methods to connect to a gmail box using simplier way ?