576
18
577
14

Made this as a replacement for URS as soon as Reddit announced their API changes c:

578
8
579
14
submitted 3 years ago* (last edited 3 years ago) by lolfaceftw@lemmy.world to c/python@programming.dev

A small project I made last month :D Makes use of tkinter and pytube ^.^

I'm quite a beginner python coder (having no experience in publishing git projects) so feel free to comment on my code!

Features:

  • Can download a playlist or single video as MP3 or MP4
  • Automatically displays youtube title and video on input of the link
  • Shows filesize prior to downloading

Note: Pytube currently has a bug so I linked a manual fix under Read.MD--

580
44

In this article, we will explore the use of the tqdm package to create beautiful progress bars in the console while downloading large files from the internet.

581
17

Maestral is an open-source Dropbox client written in Python. The project's main goal is to provide a client for platforms and file systems that are no longer directly supported by Dropbox.

582
11

Watch 80 talks, tutorials, and socials from Python Web Conf 2023 on Six Feet Up's YouTube channel. Explore videos about Python, Django, Kubernetes, AI/ML, Big Data, CI/CD, Serverless, Security, Climate Tech, and more.

583
64

A summary of Python news for the month of July 2023:

  • Python without the GIL, for good

  • LPython: a new Python Compiler

  • Pydantic 2 is getting usable

  • PEP 387 defines "Soft Deprecation", getopt and optparse soft deprecated

  • Cython 3.0 released with better pure Python support

  • PEP 722 – Dependency specification for single-file scripts

  • Python VSCode support gets faster

  • Paint in the terminal

584
16

This month we look at debuggers in Python and how to choose your own debugger instead of relying on the built-in pdb.

585
67

It’s clear that the overall sentiment is positive, both for the general idea and for PEP 703 specifically. The Steering Council is also largely positive on both. We intend to accept PEP 703, although we’re still working on the acceptance details.

Long-term (probably 5+ years), the no-GIL build should be the only build. We do not want to create a permanent split between with-GIL and no-GIL builds (and extension modules).

Short term, we add the no-GIL build as an experimental build mode, presumably in 3.13 (if it slips to 3.14, that is not a problem

586
23
587
15
588
18
589
12
590
26
Compiling typed Python (bernsteinbear.com)
591
5
592
12
Protocols in Python (til.simonwillison.net)
593
17
594
9
595
5
596
3

I ran Python, FastAPI, and PostgreSQL as docker-compose, but it doesn't work with these errors.
I don't know why this error occurs.
Full Error Message:

learn-fastapi-web-1  | Traceback (most recent call last):
learn-fastapi-web-1  |   File "<frozen runpy>", line 198, in _run_module_as_main
learn-fastapi-web-1  |   File "<frozen runpy>", line 88, in _run_code
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/__main__.py", line 4, in <module>
learn-fastapi-web-1  |     uvicorn.main()
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
learn-fastapi-web-1  |     return self.main(*args, **kwargs)
learn-fastapi-web-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
learn-fastapi-web-1  |     rv = self.invoke(ctx)
learn-fastapi-web-1  |          ^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
learn-fastapi-web-1  |     return ctx.invoke(self.callback, **ctx.params)
learn-fastapi-web-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
learn-fastapi-web-1  |     return __callback(*args, **kwargs)
learn-fastapi-web-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 416, in main
learn-fastapi-web-1  |     run(
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 587, in run
learn-fastapi-web-1  |     server.run()
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
learn-fastapi-web-1  |     return asyncio.run(self.serve(sockets=sockets))
learn-fastapi-web-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
learn-fastapi-web-1  |     return runner.run(main)
learn-fastapi-web-1  |            ^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
learn-fastapi-web-1  |     return self._loop.run_until_complete(task)
learn-fastapi-web-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
learn-fastapi-web-1  |     config.load()
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
learn-fastapi-web-1  |     self.loaded_app = import_from_string(self.app)
learn-fastapi-web-1  |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string
learn-fastapi-web-1  |     module = importlib.import_module(module_str)
learn-fastapi-web-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
learn-fastapi-web-1  |     return _bootstrap._gcd_import(name[level:], package, level)
learn-fastapi-web-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
learn-fastapi-web-1  |   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
learn-fastapi-web-1  |   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
learn-fastapi-web-1  |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
learn-fastapi-web-1  |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
learn-fastapi-web-1  |   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
learn-fastapi-web-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
learn-fastapi-web-1  |   File "/main.py", line 5, in <module>
learn-fastapi-web-1  |     from . import crud, models, schemas
learn-fastapi-web-1  | ImportError: attempted relative import with no known parent package

Dockerfile:

FROM python:latest
COPY . .
RUN pip install -r requirements.txt
CMD python -m uvicorn --host=0.0.0.0 main:app
597
42

Hi, I’m David, a Python developer at Kraken Technologies. I work on Kraken: a Python application which has, at last count, 27,637 modules. Yes, you read that right: nearly 28k separate Python files - not including tests. I do this along with 400 other developers worldwide, constantly merging in code. And all anyone needs to make a change - and kick start a deployment of the software that runs 17 different energy and utility companies, with many millions of customers - is one single approval from a colleague on Github.

Now you may be thinking this sounds like a recipe for chaos. Honestly, I would have said the same. But it turns out that large numbers of developers can, at least in the domain we work in, work effectively on a large Python monolith. There are lots of reasons why this is possible, many of them cultural rather than technical, but in this blog post I want to explain about how the organisation of our code helps to make this possible.

598
17
submitted 3 years ago* (last edited 3 years ago) by wesker@lemmy.sdf.org to c/python@programming.dev

Where do your unit tests live? Does is vary, depending on project size? Do you like a flat structure, with test files living alongside everything else? Are you a nested folders person?

I'm curious the practice of others, because I still don't feel like I've found a testing directory structure that satisfies me.

599
7
600
-2

I created a discord bot which fetches memes from lemmy. I'm still learning, looking to get some ideas from the community!

view more: ‹ prev next ›

Python

8022 readers
2 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 3 years ago
MODERATORS