Planet Python

Subscribe to Planet Python feed
Planet Python - http://planetpython.org/
Updated: 11 hours 7 min ago

The Python Show: 41 - Python Packaging and FOSS with Armin Ronacher

Wed, 2024-05-22 09:37

In this episode, I chatted with Armin Ronacher about his many amazing Python packages, such as pygments, flask, Jinja, Rye, and Click!

Specifically, we talked about the following:

  • How Flask came about

  • Favorite Python packages

  • Python packaging

  • and much more!

Links
Categories: FLOSS Project Planets

Django Weblog: Django 5.1 alpha 1 released

Wed, 2024-05-22 08:40

Django 5.1 alpha 1 is now available. It represents the first stage in the 5.1 release cycle and is an opportunity for you to try out the changes coming in Django 5.1.

Django 5.1 brings a kaleidoscope of improvements which you can read about in the in-development 5.1 release notes.

This alpha milestone marks the feature freeze. The current release schedule calls for a beta release in about a month and a release candidate about a month from then. We'll only be able to keep this schedule if we get early and often testing from the community. Updates on the release schedule are available on the Django forum.

As with all alpha and beta packages, this is not for production use. But if you'd like to take some of the new features for a spin, or to help find and fix bugs (which should be reported to the issue tracker), you can grab a copy of the alpha package from our downloads page or on PyPI.

The PGP key ID used for this release is Natalia Bidart: 2EE82A8D9470983E.

Categories: FLOSS Project Planets

ListenData: 4 Ways to Correct Grammar with Python

Tue, 2024-05-21 18:21

This tutorial explains various methods for checking and correcting grammar using Python. Automatic grammar correction helps students, professionals and content creators to make sure their writing follows proper grammar rules.

To read this article in full, please click hereThis post appeared first on ListenData
Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #630 (May 21, 2024)

Tue, 2024-05-21 15:30

#630 – MAY 21, 2024
View in Browser »

Accessibility & Assistive Tech as a Python Developer

What’s it like to learn Python as a visually impaired or blind developer? How can you improve the accessibility of your Python web applications and learn current guidelines? This week on the show, Real Python community member Audrey van Breederode discusses her programming journey, web accessibility, and assistive technology.
REAL PYTHON podcast

Lessons Learned Reinventing the Python Notebook

Marimo is an open source alternative to Jupyter notebooks. This article is by one of marimo’s creators, talking about the design decisions made when creating it.
AKSHAY KAGRAWAL

Python Error and Performance Monitoring That Doesn’t Suck

With Sentry, you can trace issues from the frontend to the backend—detecting slow and broken code, to fix what’s broken faster. Installing the Python SDK is super easy and PyCoder’s Weekly subscribers get three full months of the team plan. Just use code “pycoder” on signup →
SENTRY sponsor

Scrapy vs. Crawlee

This article from the folks at Crawlee does a side-by-side comparison of Scrapy and Crawlee, two web scraping libraries.
SAURAV JAIN

Quiz: What Are CRUD Operations?

In this quiz, you’ll revisit the key concepts and techniques related to CRUD operations. These operations are fundamental to any system that interacts with a database, and understanding them is crucial for effective data management.
REAL PYTHON

PEP 667: Consistent Views of Namespaces (Accepted)

PYTHON

Django 5.0.6 and 4.2.13 Release

DJANGO SOFTWARE FOUNDATION

Articles & Tutorials HTML and CSS Foundations for Python Developers

There’s no way around HTML and CSS when you want to build web apps. Even if you’re not aiming to become a web developer, knowing the basics of HTML and CSS will help you understand the Web better. In this video course, you’ll get an introduction to HTML and CSS for Python programmers.
REAL PYTHON course

Homoiconic Python

One of the early features of Lisp was that it could be implemented in a short Lisp program. As Lisp isn’t the easiest to read language, and not as common as Python, Mohamed runs you through the Python equivalent program to implement a Lisp interpreter.
MOHAMMED JAMAL

Build Your Own Git, Redis, or BitTorrent — in Python

The best way to master your programming craft is to get extensive practice. CodeCrafters offers structured, real-world practice projects aimed at experienced engineers. Sign up, and become a confident programmer →
CODECRAFTERS sponsor

What Is the __pycache__ Folder in Python?

In this tutorial, you’ll explore Python’s __pycache__ folder. You’ll learn about when and why the interpreter creates these folders, and you’ll customize their default behavior. Finally, you’ll take a look under the hood of the cached .pyc files.
REAL PYTHON

Garbage Collectors Are Scary

You don’t have to deal with memory management in Python because it has a garbage collector built in. This article talks about the challenges of writing a garbage collector, including the different kinds you find in different languages.
FLORIAN WEIMER

Automatically Push Code Changes During Live Coding

When teaching, Rodrigo wants to automatically push changes to Git so his students can see the steps in the repo on the fly. This quick article shows you how he solved the problem with the GitPython library.
RODRIGO GIRÃO SERRÃO

Page Dewarping

This article shows the techniques behind a page flattening algorithm. It starts with images of a book’s page which are curled from the spine of the book, and creates a resulting PDF that is a flat version.
MZUCKER.GITHUB.IO

An Intro to Logging With Loguru

“Python’s logging module isn’t the only way to create logs. There are several third-party packages you can use, too. One of the most popular is Loguru.” This article introduces you to the Loguru library.
MIKE DRISCOLL

Why Do Prototypes Suck?

Nat weighs in on prototyping: “Why is it, exactly, that prototypes are so miserable to maintain and operate? And how can we avoid putting prototypes into production?”
NAT BENNETT

Clever Code Is Probably the Worst Code You Could Write

When you come across a clever bit of code, it is hard not to admire it, but often times, clear, readable code is the hardest code to write.
LEONARDO CREED

Show All Subclasses of a class

A quick demonstration of how to use recursion and the .__subclasses__() method to obtain all the subclasses of a given class.
ADAM JOHNSON

Projects & Code pyinfra: Automate Infrastructure Using Python

GITHUB.COM/PYINFRA-DEV

tab-pal: TUI to Add Custom Tableau Colour Palettes

GITHUB.COM/BEN-N93 • Shared by Ben Nour

An Easy Way to Set Up Regular Tasks

GITHUB.COM/POMPONCHIK • Shared by Evgeniy Blinov

bridge: Automatic Infrastructure for Django With Docker

GITHUB.COM/NEVER-OVER

hashquery: Query BI Models in Your Data Warehouse

GITHUB.COM/HASHBOARD-HQ

Events Weekly Real Python Office Hours Q&A (Virtual)

May 22, 2024
REALPYTHON.COM

PyCon Italia 2024

May 22 to May 26, 2024
PYCON.IT

PythOnRio Meetup

May 25, 2024
PYTHON.ORG.BR

GeoPython 2024

May 27 to May 29, 2024
GEOPYTHON.NET

Python Sheffield

May 28, 2024
GOOGLE.COM

PyLadies Amsterdam: NLP Projects With spaCy

May 29, 2024
MEETUP.COM

Happy Pythoning!
This was PyCoder’s Weekly Issue #630.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Categories: FLOSS Project Planets

Real Python: Building a Python GUI Application With Tkinter

Tue, 2024-05-21 10:00

Python has a lot of GUI frameworks, but Tkinter is the only framework that’s built into the Python standard library. Tkinter has several strengths. It’s cross-platform, so the same code works on Windows, macOS, and Linux. Visual elements are rendered using native operating system elements, so applications built with Tkinter look like they belong on the platform where they’re run.

Although Tkinter is considered the de facto Python GUI framework, it’s not without criticism. One notable criticism is that GUIs built with Tkinter look outdated. If you want a shiny, modern interface, then Tkinter may not be what you’re looking for.

However, Tkinter is lightweight and relatively painless to use compared to other frameworks. This makes it a compelling choice for building GUI applications in Python, especially for applications where a modern sheen is unnecessary, and the top priority is to quickly build something that’s functional and cross-platform.

In this video course, you’ll learn how to:

  • Get started with Tkinter with a Hello, World application
  • Work with widgets, such as buttons and text boxes
  • Control your application layout with geometry managers
  • Make your applications interactive by associating button clicks with Python functions

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Python Bytes: #384 Force push lightly

Tue, 2024-05-21 04:00
<strong>Topics covered in this episode:</strong><br> <ul> <li><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"><strong>Git: Force push safely with</strong></a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"> </a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"><strong>--force-with-lease</strong></a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"> <strong>and</strong></a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"> </a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"><strong>--force-if-includes</strong></a></li> <li><strong>Thoughts from PyCon 2024</strong></li> <li><a href="https://github.blog/2022-05-02-friend-zone-strategies-friendly-fork-management/"><strong>Being friendly: Strategies for friendly fork management</strong></a></li> <li><a href="https://github.com/gauge-sh/tach"><strong>tach</strong></a></li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=aI0eYTu1ab8' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="384">Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by Mailtrap: <a href="https://pythonbytes.fm/mailtrap"><strong>pythonbytes.fm/mailtrap</strong></a></p> <p><strong>Connect with the hosts</strong></p> <ul> <li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a></li> <li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a></li> <li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a></li> </ul> <p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/live</strong></a> to be part of the audience. Usually Tuesdays at 10am PT. Older video versions available there too.</p> <p>Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to <a href="https://pythonbytes.fm/friends-of-the-show">our friends of the show list</a>, we'll never share it.</p> <p><strong>Brian #1:</strong> <a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"><strong>Git: Force push safely with</strong></a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"> </a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"><strong>--force-with-lease</strong></a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"> <strong>and</strong></a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"> </a><a href="https://adamj.eu/tech/2023/10/31/git-force-push-safely/"><strong>--force-if-includes</strong></a></p> <ul> <li>Adam Johnson</li> <li>Using gentle force </li> <li>Avoid stomping on remote changes with a couple extra flags.</li> </ul> <p><strong>Michael #2:</strong> <strong>Thoughts from PyCon 2024</strong></p> <ul> <li>PyCon is special - the connections you make are always more than you expect</li> <li>Great to see many old friends</li> <li>Did a ”live” Talk Python episode that’ll be out in a few weeks.</li> <li>The talks look great, we’ll let you know when they land on YouTube.</li> <li>Masks were a mistake - universally heard complaints from fellow attendees. This is my two cents towards a more reasonable next PyCon.</li> </ul> <p><strong>Brian #3:</strong> <a href="https://github.blog/2022-05-02-friend-zone-strategies-friendly-fork-management/"><strong>Being friendly: Strategies for friendly fork management</strong></a></p> <ul> <li>That’s part 2. </li> <li>Part 1 is <a href="https://github.blog/2022-04-25-the-friend-zone-friendly-forks-101/">Being friendly: Friendly forks 101</a></li> <li>Lessley Dennington on GitHub Blog</li> <li>Examples of long running friendly forks <ul> <li>git-for-windows/git, microsift/git, github/git</li> <li>two public, one private</li> </ul></li> <li>Fork management strategies - when pulling changes downstream <ul> <li>merging rebase <ul> <li>git-for-windows/git uses this proactively and regularly</li> <li>fake merge + rebase</li> </ul></li> <li>new branch <ul> <li>microsoft/git uses this</li> <li>new branch from upstream major versions</li> <li>merge previous changes to new branch</li> </ul></li> <li>traditional merge <ul> <li>github/git uses this, conservatively, after a few point bug fix versions</li> </ul></li> </ul></li> </ul> <p><strong>Michael #4:</strong> <a href="https://github.com/gauge-sh/tach"><strong>tach</strong></a></p> <ul> <li>A Python tool to enforce a modular, decoupled package architecture.</li> <li>tach allows you to define boundaries and control dependencies between your Python packages. </li> <li>Each package can define its public interface.</li> <li>If a package tries to import from another package that is not listed as a dependency, tach will report an error. </li> <li>If a package tries to import from another package and does not use its public interface, with strict: true set, tach will report an error.</li> <li>Zero runtime impact.</li> </ul> <p><strong>Extras</strong> </p> <p>Brian:</p> <ul> <li><a href="https://pydantic.dev/logfire">Logfire - new observability platform from the pydantic team</a> - free for now</li> </ul> <p>Michael:</p> <ul> <li><a href="https://training.talkpython.fm/courses/getting-started-with-spacy">10% off the new spaCy course</a> throughout May</li> </ul> <p><strong>Joke:</strong> <a href="https://marketoonist.com/2023/01/evolution-of-smart-products.html">Evolution of smart products</a></p>
Categories: FLOSS Project Planets

Quansight Labs Blog: Writing fast string ufuncs for NumPy 2.0

Mon, 2024-05-20 20:00
The journey of writing string ufuncs and creating the np.strings namespace for NumPy 2.0
Categories: FLOSS Project Planets

Real Python: Basic Data Types in Python: A Quick Exploration

Mon, 2024-05-20 10:00

Python has several basic data types that are built into the language. With these types, you can represent numeric values, text and binary data, and Boolean values in your code. So, these data types are the basic building blocks of most Python programs and projects.

In this tutorial, you’ll learn about:

  • Numeric types, such as int, float, and complex
  • The str data type, which represents textual data
  • The bytes and bytearray data types for storing bytes
  • Boolean values with the bool data type

In this tutorial, you’ll learn only the basics of each data type. To learn more about a specific data type, you’ll find useful resources in the corresponding section.

Get Your Code: Click here to download the free sample code that you’ll use to learn about basic data types in Python.

Take the Quiz: Test your knowledge with our interactive “Basic Data Types in Python: A Quick Exploration” quiz. You’ll receive a score upon completion to help you track your learning progress:

Interactive Quiz

Basic Data Types in Python: A Quick Exploration

Take this quiz to test your understanding of the basic data types that are built into Python, like numbers, strings, and Booleans.

Python’s Basic Data Types

Python has several built-in data types that you can use out of the box because they’re built into the language. From all the built-in types available, you’ll find that a few of them represent basic objects, such as numbers, strings and characters, bytes, and Boolean values.

Note that the term basic refers to objects that can represent data you typically find in real life, such as numbers and text. It doesn’t include composite data types, such as lists, tuples, dictionaries, and others.

In Python, the built-in data types that you can consider basic are the following:

Class Basic Type int Integer numbers float Floating-point numbers complex Complex numbers str Strings and characters bytes, bytearray Bytes bool Boolean values

In the following sections, you’ll learn the basics of how to create, use, and work with all of these built-in data types in Python.

Integer Numbers

Integer numbers are whole numbers with no decimal places. They can be positive or negative numbers. For example, 0, 1, 2, 3, -1, -2, and -3 are all integers. Usually, you’ll use positive integer numbers to count things.

In Python, the integer data type is represented by the int class:

Python >>> type(42) <class 'int'> Copied!

In the following sections, you’ll learn the basics of how to create and work with integer numbers in Python.

Integer Literals

When you need to use integer numbers in your code, you’ll often use integer literals directly. Literals are constant values of built-in types spelled out literally, such as integers. Python provides a few different ways to create integer literals. The most common way is to use base-ten literals that look the same as integers look in math:

Python >>> 42 42 >>> -84 -84 >>> 0 0 Copied!

Here, you have three integer numbers: a positive one, a negative one, and zero. Note that to create negative integers, you need to prepend the minus sign (-) to the number.

Python has no limit to how long an integer value can be. The only constraint is the amount of memory your system has. Beyond that, an integer can be as long as you need:

Python >>> 123123123123123123123123123123123123123123123123 + 1 123123123123123123123123123123123123123123123124 Copied!

For a really, really long integer, you can get a ValueError when converting it to a string:

Python >>> 123 ** 10000 Traceback (most recent call last): ... ValueError: Exceeds the limit (4300 digits) for integer string conversion; use sys.set_int_max_str_digits() to increase the limit Copied! Read the full article at https://realpython.com/python-data-types/ »

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Robin Wilson: How to subscribe to releases on Github

Mon, 2024-05-20 05:00

For a while I’d wished there was an easy way to get notified when my favourite open-source packages release a new version. I’d often see something on social media, but that tended to only be for the larger packages – and I wanted to keep up with the smaller ones too.

When I actually bothered to put five minutes of work into finding out if this was possible, I found it was pretty easy. So, here’s how to do it:

  1. Go to the Github repository page for the package you’re interested in.

  2. Click the down arrow next to the ‘Watch’ badge at the top right of the header:

  1. Click ‘Custom’ and then tick ‘Releases’ and click ‘Apply’:

And that’s it! Now you’ll get a notification email when a new release is created on Github. Of course, this relies on the specific project using Github Releases, which not all open-source projects do, but a fairly high proportion of them seem to. After doing this you’ll get an email when there is a new release, with the details of the release and links to see it on Github. An example email for the stac-fastapi repository is below:

Update: Peter in the comments informed me that you can also get an Atom feed for use in your RSS reader by going to https://github.com/{owner}/{repo}/releases.atom. For example, this link for my Py6S package

Categories: FLOSS Project Planets

Zato Blog: SSH commands as API microservices

Mon, 2024-05-20 04:00
SSH commands as API microservices 2024-05-20, by Dariusz Suchojad

This is a quick guide on how to turn SSH commands into a REST API service. The use-case may be remote administration of devices or equipment that does not offer a REST interface or making sure that access to SSH commands is restricted to selected external REST-based API clients only.

Python

The first thing needed is code of the service that will connect to SSH servers. Below is a service doing just that - it receives name of the command to execute and host to run in on, translating stdout and stderr of SSH commands into response documents which Zato in turn serializes to JSON.

# -*- coding: utf-8 -*- # stdlib from traceback import format_exc # Zato from zato.server.service import Service class SSHInvoker(Service): """ Accepts an SSH command to run on a remote host and returns its output to caller. """ # A list of elements that we expect on input input = 'host', 'command' # A list of elements that our responses will contain output = 'is_ok', 'cid', '-stdout', '-stderr' def handle(self): # Local aliases host = self.request.input.host command = self.request.input.command # Correlation ID is always returned self.response.payload.cid = self.cid try: # Build the full command full_command = f'ssh {host} {command}' # Run the command and collect output output = self.commands.invoke(full_command) # Assign both stdout and stderr to response self.response.payload.stdout = output.stdout self.response.payload.stderr = output.stderr except Exception: # Catch any exception and log it self.logger.warn('Exception caught (%s), e:`%s', self.cid, format_exc()) # Indicate an error self.response.payload.is_ok = False else: # Everything went fine self.response.payload.is_ok = True Dashboard

In the Zato Dashboard, let's go ahead and create an HTTP Basic Auth definition that a remote API client will authenticate against:

Now, the SSH service can be mounted on a newly created REST channel - note the security definition used and that data format is set to JSON. We can skip all the other details such as caching or rate limiting, for illustration purposes, this is not needed.

Usage

At this point, everything is ready to use. We could make it accessible to external API clients but, for testing purposes, let's simply invoke our SSH API gateway service from the command line:

$ curl "api:password@localhost:11223/api/ssh" -d \ '{"host":"localhost", "command":"uptime"}' { "is_ok": true, "cid": "27406f29c66c2ab6296bc0c0", "stdout": " 09:45:42 up 37 min, 1 user, load average: 0.14, 0.27, 0.18\n"} $ Note that, at this stage, the service should be used in trusted environments only, e.g. it will run any command that it is given on input which means that in the next iteration it could be changed to only allow commands from an allow-list, rejecting anything that is not recognized.

And this completes it - the service is deployed and made accessible via a REST channel that can be invoked using JSON. Any command can be sent to any host and their output will be returned to API callers in JSON responses.

Next steps More blog posts
Categories: FLOSS Project Planets

Sumana Harihareswara - Cogito, Ergo Sumana: Links and References For My PyCon US Keynote

Sun, 2024-05-19 15:42
Links and References For My PyCon US Keynote
Categories: FLOSS Project Planets

PyCon: PyCon US 2024 Welcomes Seven Companies to Startup Row

Sun, 2024-05-19 15:00
It’s another year, and that means it’s time for another PyCon US. This event offers an opportunity to bring together a vibrant and diverse community of engineers, data scientists, researchers, students, and enthusiasts who use the Python programming language for work and for fun.

It also presents a unique opportunity to highlight entrepreneurs building the future of the Python ecosystem. 2024 marks the thirteenth year that PyCon US has invited early-stage companies to present their ventures on Startup Row. Tools and platforms like Pandas, Plotly, and more—now fixtures of the Python software ecosystem—were built by companies that were featured on Startup Row. And with each new year there’s an opportunity to catch a glimpse of what’s next.

PyCon US organizers and the Python Software Foundation are thrilled to welcome seven companies to Startup Row at PyCon US 2024.The Startup Row Lineup at PyCon US 2024DAGWorks

Alexander Hamilton and Aaron Burr might’ve been historic rivals, but the two open-source Python libraries named after them—Hamilton and Burr—work together quite nicely. The company behind Hamilton and Burr, DAGWorks, was founded with the goal of standardizing the way developers build data, LLM, and RAG pipelines, as well as managing and observing application state; both libraries also come with optional self-hosted UIs. Hamilton is the older of the two projects and is used in production by many companies, from banks to startups, to government departments, through to enterprise conglomerates. DAGWorks is based in the San Francisco Bay Area and was founded by Hamilton and Burr co-creators Stefan Krawczyk and Elijah ben Izzy, who previously worked together at Stitch Fix where they built the styling service’s MLOps stack. DAGWorks participated in Y Combinator’s Winter 2023 accelerator batch.

Dispatch

Building and maintaining distributed systems is a complex and often frustrating exercise. A given function might go rogue, either firing too frequently or silently failing to execute when needed. Dispatch is a startup aiming to make building reliable distributed systems a breeze. Its platform offers developers the ability to make any async function resumable by simply wrapping it with a @dispatch.function decorator, enabling durable workflows and robust error handling. Quoting a customer, ““I love the API design, just tuck in a decorator and you’re done, almost feels like cheating!” The company was founded by engineers with experience building high-scale distributed systems at companies like Meta, Segment, and Twilio, among others.

dltHub

Dealing with data can be a chore for developers. One has to actually get the data, clean it up, and that data has to get loaded somewhere for it to be useful. At least for that last step, there’s dlt (a.k.a. data load tool), an open source Python library that takes the hassle out of shepherding data from one place to another. The library features out of the box integrations for dozens of verified data sources and destinations, making it easy to fetch data from places like Facebook Ads, Pandas dataframes, or even Chess.com and then load data into destinations ranging from Databricks and Snowflake to Postgres and DuckDB. dltHub, the company behind the popular dlt library, is based in Berlin and New York City. “Today it is easier to pip install dlt and write a custom source in Python than to setup and configure a traditional ETL platform,” said CEO and co-founder Matthaus Krzykowski. The startup is backed by Dig Ventures and technical founders from companies like Huggingface, Miro, Matillion, and others.

Exaloop

What gets called “big” data is constantly shifting. Not too long ago, anything over a handful of gigabytes was pretty big. Now, working datasets can be several orders of magnitude larger, which presents a challenge for data scientists and developers who just want to write Python. Enter Exaloop. The MIT spinout company’s platform enables data scientists and engineers to write and run Python workflows that execute extremely fast (10x-100x faster than vanilla Python), even when dealing with truly massive data. The secret sauce: Codon, a high-performance Python compiler that uses LLVM. Codon has garnered a fair bit of attention from the developer community, racking up nearly 14,000 stars on Github. The company is planning to release a new entirely cloud-based platform, enabling users to leverage Exaloop’s tech and performance benefits conveniently within a browser window.

Pandas AI

Data analysis packages like Pandas are, to most users, pretty intuitive. Someone with a bit of Python knowledge can get the hang of these tools pretty quickly. But not everyone knows Python, and many others find the prospect of writing code intimidating. For those who prefer to ask questions rather than write complex queries, there’s PandasAI. PandasAI allows users to connect to a database or import a CSV, making data interaction conversational. “We want to make it easy for anyone, in any company, to be able to derive valuable insights from data. That shouldn’t be limited to a small team of engineers and analysts,” said PandasAI founder and CEO Gabriele Venturi. Users can write queries in natural language (e.g. “In my database of ecommerce transactions, which customer Id appears most often?”) and even command PandasAI to plot out the data they’re analyzing. The library is compatible with several LLM providers and model variants, reducing the risk of model lock-in. PandasAI is open source and has over 11,000 stars on Github. The company participated in Y Combinator’s Winter 2024 batch.

Pixee

When it comes to application security, many developers wish for the equivalent of magical fairy dust they can sprinkle on their codebase to fix bugs and vulnerabilities. Pixee is about as close as developers can get to that magical fairy dust. The D.C. metro area-based security startup is the maker of Pixeebot, a virtual security engineer that automatically triages and fixes potential security issues before they can be exploited in production. The bot is built on Codemodder, an open source framework created and maintained by Pixee, that can find and fix issues in Python and Java. Pixee intends to extend language support to JavaScript, and Node.js in the near future'

Trellis

There’s nothing better than clean, well-structured data. It’s easy to query, easy to work with, and easy to add value to any enterprise or personal use case. The problem is that data rarely comes so neatly packaged. Trellis helps developers ingest and extract insights from unstructured data sources like sales calls, regulatory filings, business contracts, large-scale web scrapes, and more. Trellis users can define their data schema in natural language, which is transformed into a structured SQL format that can integrate with hundreds of data sources and LLM-augmented workflows. The company is based in San Francisco and participated in Y Combinator’s Winter 2024 accelerator batch.

A Quick Look Back at 2023’s Startup Row Alumni

Startup founders make no small plans. Startups are inherently risky and not all are destined for greatness, but the 2023 batch of Startup Row companies seems to be on the path to success.

  • 🦄 Imbue, a generative AI company developing agentic models that can reason and code, raised $200M+ in Series B funding at a $1B+ valuation. Investors in that deal include NVIDIA, Astera Institute, Notion co-founder Simon Last, and former Cruise CEO Kyle Vogt, among others. The company was formerly known as Generally Intelligent.
  • Neptyne continued expanding its Python-included spreadsheet tools and launched a Google Sheets extension that brings real, live Python to Google’s spreadsheet software. Neptyne also launched API integrations, giving its users credits to call OpenAI, Bing web search, web page rendering through PhantomJsCloud, Google’s geocoder, and financial information within their spreadsheet environments.
  • Nixtla released TimeGPT (ArXiv). Considering the company’s whole raison d'être is building time series data modeling and projection tools, this seems like a great use of transformer models’ next-token prediction capabilities. Nixtla’s open source tools continue to gain popularity.
  • ❄️ Ponder Data, maker and maintainer of Modin, was acquired by Snowflake to expand the Python capabilities of its data cloud platform. Modin is used by hundreds of thousands of users and serves as a drop-in replacement for the ever popular Pandas library.
  • Predibase. A month or so after PyCon 2023, the company announced that it had raised another $12.2 million from Felicis Ventures to bring total Series A funding up to $28M. In November the company released its LoRA Exchange (LoRAX) framework to the open source community under an Apache 2.0 license. According to Predibase’s announcement, “[the framework] makes it possible to serve hundreds of fine-tuned LLMs at the cost of one GPU with minimal degradation in throughput and latency.” In February the company launched LoRA Land, an LLM playground featuring 25 fine-tuned open source LLMs that “rival or outperform GPT-4” on specific tasks.
  • Reflex is the new name of the company formerly known as Pynecone, and its open-source web application framework is garnering more attention than ever. Back in August the YC alumni company announced that it raised $5M in seed funding led by Lux Capital to continue building out its platform and develop and launch a revenue-generating hosting service for Reflex apps. The company’s open source framework has over 17,000 stars on Github.
  • Wherobots, a geospatial data platform founded by the creators of Apache Sedona, announced $5.5 million in seed funding to build out its enterprise platform. Apache Sedona has been downloaded over 20 million times and is among the top one percent of most-downloaded packages on PyPI.

Needless to say, we’re pleased to be at least a small part of these companies’ ongoing success.

Thank You’s & AcknowledgementsStartup Row is made possible by the trust, logistical support, and tireless efforts of countless folks.
A heartfelt thanks goes out to the organizers and volunteers who work diligently to ensure PyCon US is a positive and engaging event, both in-person and virtually.
We also extend our gratitude to the many entrepreneurs who, despite their undoubtedly busy schedules, applied to Startup Row. Your time and attention are valuable, and we appreciate the thought you put into your applications.
A special thanks goes to the selection committee. Scoring such a competitive applicant pool is a significant commitment, and their time and expertise is greatly appreciated.
Lastly, our deepest thanks to the 7 companies that traveled to Pittsburgh to share their innovations with over 2,700 PyCon US attendees. Thank you all once again.

Categories: FLOSS Project Planets

Juri Pakaste: DotEnvy

Sat, 2024-05-18 13:00

I released a new Swift library, DotEnvy. It's a parser and loader for dotenv files.

Dotenv is a vaguely specified format that is supported by libraries found for most languages used in server-side development. The idea is that a twelve-factor app is supposed to read its configuration from environment variables, which can be a hassle to maintain during development. So you store them in a non-version controlled file called .env your application reads upon startup.

The format looks more or less like this:

KEY1=VALUE1 KEY2="VALUE2" KEY3="MULTILINE VALUE" KEY4='REFERENCE TO ${KEY3}'

The Swift libraries I could find seemed to lack features and had not seen updates in years. I don't think a library like this needs a huge number of features, but multiline strings and variable references were something I wanted. And writing parsers is fun.

DotEnvy has good test coverage and online documentation. There's also pretty good error reporting.

There's also a command line tool that allows you to syntax check a dotenv file or convert it to JSON. I was going add a launcher (i.e. run dotenv-tool launch sh and it'd export the environment from .env and run sh), but discovered that pseudo terminals are a pain and my Stevens has gone missing. Patches are welcome.

I accidentally used the same name as a Rust dotenv library, but I decided there's enough namespacing provided by the language support that the risk of confusion isn't too great.

Categories: FLOSS Project Planets

Juri Pakaste: Git history search with fzf

Sat, 2024-05-18 12:00

fzf is one of my favorite shell tools. I have a ton of scripts where I use it for selection. Here's one for searching git history. git log -Gpattern allows you to search for commits that contain pattern in the patch text. Combine it with fzf and you get a pretty decent history search tool.

I have this saved as ~/bin/git-search-log, so I can invoke it as git search-log pattern or git search-log pattern branch:

#!/bin/bash set -euo pipefail # Ensure compatibility with fish etc by ensuring fzf uses bash for the preview command export SHELL=/bin/bash git log -G$@ --oneline | fzf \ --preview-window=bottom,80% \ --preview "echo {} | sed 's/ .*//g' | xargs git show --color" \ --bind 'enter:execute(commit=$(echo {} | sed "s/ .*//g") && git diff-tree --no-commit-id --name-only $commit -r | fzf --preview-window=bottom,80% --preview "git show --color $commit -- $(git rev-parse --show-toplevel)/\{}")'

When you run it you get an selection of matching commits, one per line, with a preview window showing the patch. If you hit enter on a commit, you get another fzf screen, this time allowing you to select files modified in that commit. Hit enter again and you're back in the first one.

Categories: FLOSS Project Planets

Python Morsels: Assignment vs. Mutation in Python

Sat, 2024-05-18 08:13

In Python, "change" can mean two different things. Assignment changes which object a variable points to. Mutation, changes the object itself.

Table of contents

  1. Remember: variables are pointers
  2. Mutating a list
  3. Mutation
  4. Assignment
  5. Assignments versus mutations
  6. Changing variables and changing objects

Remember: variables are pointers

When talking about Python code, if I say we changed X, there are two different things that I might mean.

Let's say we have two variables that point to the same value:

>>> a = [2, 1, 3, 4] >>> b = a

Remember that variables in Python are pointers. That means that two variables can point to the same object. That's actually what we've done here.

Let's change the object that the variable b points to.

Mutating a list

If we append a number …

Read the full article: https://www.pythonmorsels.com/assignment-versus-mutation/
Categories: FLOSS Project Planets

Sumana Harihareswara - Cogito, Ergo Sumana: Model UX Research &amp;amp; Design Docs for Command-Line Open Source

Fri, 2024-05-17 12:42
Model UX Research & Design Docs for Command-Line Open Source
Categories: FLOSS Project Planets

Sumana Harihareswara - Cogito, Ergo Sumana: Celebrate Beautiful Soup&amp;#x27;s 20th Anniversary

Fri, 2024-05-17 12:42
Celebrate Beautiful Soup's 20th Anniversary
Categories: FLOSS Project Planets

Sumana Harihareswara - Cogito, Ergo Sumana: A Celebration of My Friend, Dr. Mel Chua

Fri, 2024-05-17 12:42
A Celebration of My Friend, Dr. Mel Chua
Categories: FLOSS Project Planets

Sumana Harihareswara - Cogito, Ergo Sumana: User Support, Equanimity, And Potential Cross-Project Tools and Practices in Open Source

Fri, 2024-05-17 12:42
User Support, Equanimity, And Potential Cross-Project Tools and Practices in Open Source
Categories: FLOSS Project Planets

Sumana Harihareswara - Cogito, Ergo Sumana: Maintainer Burnout: PyCon US 2023 Followup

Fri, 2024-05-17 12:42
Maintainer Burnout: PyCon US 2023 Followup
Categories: FLOSS Project Planets

Pages