TG Telegram Group Link
Channel: Python Daily
Back to Bottom
ScrumMD: A CLI Scrum tool written in Python

I got grumpy with our Scrum process, and I thought about what kinda tool I'd love to work with... so I started making it in my beloved Python. I think it's mature enough I'd like to start giving it to other people.

It's called ScrumMD. It's open source, and you can already install it with pip (pip install scrummd) if you've got Python 3.10+. Documented, with tutorials on https://scrummd.readthedocs.io/en/stable/ and source on https://github.com/lkingsford/scrummd

What my project does

Short version is that it's some tools to support you storing all of your Scrum cards (or, I guess, other cards - tickets perhaps?) in markdown format on a local machine. There's intentionally a lot of flexibility - so, every card needs a summary, but everything else is fair game. You can configure to require fields for some collections (like needing status in stories), or limit fields (like requiring status be 'Done' or 'In Progress').

Target Audience

Limited, but public. It's chief audience is software engineers who work in self-organising teams. It's for teams who use processes like Scrum, but don't need the bureaucracy layers.

Honestly - I know it's niche. Heck, I won't even be using it at work myself. But, if I could, I would - because

/r/Python
https://redd.it/1c69jns
Django PyCryptodome AES decryption - ValueError: Padding is incorrect

I am trying to encrypt incoming files and than decrypt them later. I was following the [documentation](https://www.pycryptodome.org/src/cipher/classic#cbc-mode) for how to use AES with CBC mode for decryption and encryption.

My view for uploading and encrypting file:

@router.post("/upload_files")
def upload_files(request, file: UploadedFile = File(...)):
save_file = operations.aes_encryption(user_id=request.auth.id,file=request.FILES.get('file'))

def aes_encryption(self,user_id,file):
user = UserQueries.get_user(id=user_id)
key: bytes = bytes(user.key, "utf-8")
path: str = user.path

save_file = self._encrypt_file(file,key,path,user)

return save_file

def _encrypt_file(self,file,key,path,user):
file_content = file.read()

cipher = AES.new(key, AES.MODE_CBC)


/r/django
https://redd.it/1c6cewm
Using multiple apps in a project

Hey everyone, django/backend dev beginner here, have what might be a newbie question and i suppose it might lead to more of a design discussion than a one size fits all answer...

​

Essentially wondering when I should be using multiple apps in a project?

​

For context, im working on a patient portal type of application in a health care context. Essentially the purpose is to visualize data from sensors.

​

Key objects include patients, sensors, and clinics (treatment sites)....in addition there will be different User types that need to be implemented.

​

So i'm wondering how I should go about structuring the project? Should every item needing CRUD operations be its own separate app, or should eeeevrrything be in one models.py file? What are the things I should be thinking about to answer these questions?

​

/r/django
https://redd.it/1c6fhs8
Can't use div styles

/r/flask
https://redd.it/1c6em16
Deploying Multi-Module Python Applications on GCP: Service Recommendations?

I'm working on a project involving a Python application with multiple interacting modules and am looking for some advice on deploying it efficiently on Google Cloud Platform. Here's a brief overview of what the application entails:


Functionality Overview:
Data Fetching: One module fetches data from external websites.
Data Extraction: Another module extracts data from another GCP project.
Data Processing: Variables are processed across various modules.
CSV Output: The app generates and stores CSV files.
Scheduled Running: The application should run automatically once daily.


I would greatly appreciate your insights on the following questions:
1. What are the best GCP services to use for this type of application?
2. Recommended Python libraries for handling web data retrieval in this case?
3. How to proceed step by step? I intend to first deploy my Python application using placeholder inputs and simple printed outputs. Then, I plan to integrate the data fetching component and implement the creation and storage of CSV files. Does this strategy seem logical to you?


Currently, I only tried to deploy my Python code using Google Cloud Functions, but I find this method impractical because I must deploy each module separately.

/r/Python
https://redd.it/1c6b77i
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/1c6pauh
Monitoring asyncio ready queue in python

I'm optimizing the performance of a Python application that includes many non-blocking I/O operations, some of which involve making HTTP API calls. We use an asynchronous client for all I/O operations, including database and Redis access. During load testing with concurrent users, we've noticed that processing times significantly increase with the number of users. How can we determine if this slowdown is due to delays in API calls or if there is a significant delay in the event loop picking up tasks that have been resolved and added to the ready queue?
I have tried setting up an async task which runs continuously with an asyncio.sleep(2) and measures the time difference between the actual time and 2 seconds, thus giving me a proxy of what is the delay at that moment. This worked fine even though with some overhead of running a task every 2 seconds and it's still a proxy. Instead, I'm looking for ways to monitor this on explicit async tasks.

/r/Python
https://redd.it/1c6qpbo
Windows Chrome and Firefox Cookie Extractor

# Windows Chrome and Firefox Cookie Extractor

## What my project does

The Chrome and Firefox Cookie Extractor is a Python script that allows you to extract cookies from both Chrome and Firefox browsers. It provides a convenient way to retrieve cookie information, including the domain, name, value, expiration date, and other attributes. The script supports three output formats: Netscape, JSON, and plain text.

## Target Audience

This project is intended for developers, security researchers, and anyone who needs to extract and analyze cookie data from Chrome and Firefox browsers. It can be useful for various purposes, such as:

- Debugging and testing web applications
- Analyzing user behavior and tracking
- Identifying potential security vulnerabilities
- Automating cookie extraction for data analysis

## Comparison

Compared to other cookie extraction tools, this script offers several advantages:

1. Dual-browser support: It supports both Chrome and Firefox, allowing you to extract cookies from either browser or combine cookies from both browsers into a single output file.

2. Multiple output formats: The script provides three output formats (Netscape, JSON, and plain text) to cater to different requirements and preferences.

3. Customizable output: You can specify the output file path and choose the desired output format using command-line arguments.

4. Easy to use: The script is simple to

/r/Python
https://redd.it/1c6n8sw
How to Exclude mediaroot and media Folders from git repository using gitignore file ?

**How to Exclude media\
root and media Folders from git repository using .gitignore file ?

​

/r/djangolearning
https://redd.it/1c6ezeb
Achieve true parallelism in Python 3.12

Article link: https://rishiraj.me/articles/2024-04/python\_subinterpreter\_parallelism

I have written an article, which should be helpful to folks at all experience levels, covering various multi-tasking paradigms in computers, and how they apply in CPython, with its unique limitations like the Global Interpreter Lock. Using this knowledge, we look at traditional ways to achieve "true parallelism" (i.e. multiple tasks running at the same time) in Python.

Finally, we build a solution utilizing newer concepts in Python 3.12 to run any arbitrary pure Python code in parallel across multiple threads. All the code used to achieve this, along with the benchmarking code are available in the repository linked in the blog-post.

This is my first time writing a technical post in Python. Any feedback would be really appreciated! 😊

/r/Python
https://redd.it/1c6sdyj
Anyone use django-vite? Trying to figure out best approach to SEO

Building a website for a company I’m starting with some others. I chose the stack of django REST server using DRF and a React SPA frontend with Vite. Everything is working great but we recently were talking SEO (and meta data) and realized my stack choice isn’t the best but I’m essentially done with the mvp and want to see if I can figure out a solution without having to rip out too much. Already debating moving everything to Nextjs since I’m a big React person.

I know Google and others can scrape JavaScript now but I also know that SSR is a faster delivery for better SEO scores and also metadata (like sending a link on a social media and preloading info about it) is very important.

I stumbled upon a supported package called django-vite which seems to bring Vite into django and handle the webpack stuff. I’m assuming this will do the SSR of my application with Vite/react and I can then just ditch my hosted SPA or would I just be doing the same thing but extra steps?

Does anyone else have any tips on how to best handle my situation?

Reason I went with django instead of

/r/django
https://redd.it/1c6skwc
How to find remote position?

Hello guys,

I'm a Django developer that's looking into working remotely / freelancing as a full stack Django developer.

I work in DevOps so I have a good knowledge of Linux, Docker, Cloud, etc.. but in my free time I practice full stack Django development and would like to make some money with that either by getting another remote job or by freelancing.

Where do you find clients when first starting to freelance? Are there any specific Django sites or groups?

All advice is appreciated!

/r/djangolearning
https://redd.it/1c4ix7w
Seeking Advice: Automating Tasks with Python Under Strict IT Restrictions

I’m currently a Computer Science student and work as an Applications Support Engineer.

I have been encountering a lot of manual and repetitive tasks at my job that I’m eager to automate to improve my productivity.

However, theres a lot of IT restrictions on my work laptop. Even the developers on another team face similar challenges and end up using their personal devices for certain tasks due to these limitations.

Previously, in a different role within the same company, I successfully automated tasks using Excel Power Query, Excel VBA, and Power Automate. I’m new to Python and would like to leverage it for automation as well, but I’m unsure how to navigate the IT restrictions.

Does anyone have experience or advice on how to deal with such situations? Any workarounds or tips on using Python in a restricted IT environment would be greatly appreciated!

Thank you in advance for your help!

/r/Python
https://redd.it/1c6y1av
Help me how to structure a model for a Django project.

I want to replicate https://www.sporcle.com/games/g/worldflags this quiz web app to have a better grasp on Django. I will be using react on frontend and Django on backend. In model I will have ImageField for flag image and Textfield for user input to guess the country. So how do I structure model so that each image(flag) holds the text(country name) like dictionary (key:value) i.e key=flag of usa , value=USA Or how do I do it. Thanks.

/r/django
https://redd.it/1c70s3y
Add Stripe subscriptions to Django in 7 minutes 💵

Hi fellow Django-ers🐎

I wrote a short guide showing how to add Stripe subscriptions to Django extremely quickly - using as little code as possible.

The guide includes local webhook testing and uses Stripe's client-only checkout and customer portal.

If you're interested, here's the post: Add Stripe subscriptions to Django in 7 minutes 💵

I hope that you're having a good day. I'll answer any questions quickly.

https://preview.redd.it/ogjyesipl8vc1.png?width=704&format=png&auto=webp&s=e8c17914d5827f33084772c09153f675aaeed6a1

​

/r/django
https://redd.it/1c72zol
Open Sourcing a Python Project the Right Way in 2024

I recently open-sourced a package and the tooling was a bit of a struggle. I decided to write down the steps & all the tools needed to open-source a Python package in a scalable way that invite users and contributors.

https://jonathanadly.com/open-sourcing-a-python-project-the-right-way-in-2024

Happy to hear your feedback!

/r/Python
https://redd.it/1c70x8m
Has PyPI ceased all support?

Does anyone know what’s going on behind the scenes of PyPI (who maintains `pip install`)? It seems like they’ve stopped processing support tickets over a month ago.


I’ve hit the data limit for my package [PyBoy\](https://github.com/baekalfen/pyboy), and I immediately posted a ticket to get the limit increased (as others have successfully done). But after more than a month, and several attempts at contacting the support team, I’ve heard nothing back, and I’ve run out of options.


Does anyone know what’s happening, or how to get a comment from PyPI?


My ticket is this one: https://github.com/pypi/support/issues/3757

/r/Python
https://redd.it/1c6y1pi
PyPDFForm now lets you create widgets without Acrobat

Hello (https://www.reddit.com/r/Python/)! Earlier this year I made a post about my open source project PyPDFForm and got some really nice feedbacks from you guys.

I have been since then continuously working on it and I'd love to share you two really cool features that were newly added to the library.

The first one is, like what the title says, the library finally supports creating a subset of widgets through code now. One of the previous hard dependency for PyPDFForm was that it requires a PDF template that was prepared using another tool, namely Adobe Acrobat or some web based ones like DocFly. Well now, at least for text field, checkbox, and dropdown, you can do it through plain Python code. I personally find this a huge milestone of the project and if you are interested in this new feature checkout the documentation here.

The second new feature, which is actually not quite new because this was how PyPDFForm worked back in its ancestral stage, is that now you can fill a PDF form "in place", meaning when you fill it this way, the output PDF will look like as if it's filled manually. The reason why this got removed was because of a bug related to text field, where

/r/Python
https://redd.it/1c7aioh
HTML Embed Code:
2024/04/18 19:35:50
Back to Top