Planet Python

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

PyCoder’s Weekly: Issue #649 (Oct. 1, 2024)

Tue, 2024-10-01 15:30

#649 – OCTOBER 1, 2024
View in Browser »

Python 3.13: Cool New Features for You to Try

In this tutorial, you’ll learn about the new features in Python 3.13. You’ll take a tour of the new REPL and error messages and see how you can try out the experimental free threading and JIT versions of Python 3.13 yourself.
REAL PYTHON

Incremental GC and Pushing Back the 3.13.0 Release

Some last minute performance considerations are delaying the release of Python 3.13 with one of the features being backed out. The new target is next week.
PYTHON.ORG

Debug With pdb and breakpoint()

Python ships with a command-line based debugger called pdb. To set a breakpoint, you call the breakpoint() function in your code. This post introduces you to pdb and debugging from the command-line.
JUHA-MATTI SANTALA

Last Chance to be Part of Snyk’s DevSeccon 2024 Oct 8-9!

Don’t miss out on your chance to register for DevSecCon 2024! From the exciting lineup of 20+ sessions, here’s one that you can’t skip: Ali Diamond, from Hak5: “I’m A Software Engineer, and I Have to Make Bad Security Decisions—why?” Save your spot →
SNYK.IO sponsor

Django Project Ideas

Looking to experiment or build your portfolio? Discover creative Django project ideas for all skill levels, from beginner apps to advanced full-stack projects.
EVGENIA VERBINA

2025 DSF Board Nominations

DJANGO SOFTWARE FOUNDATION

Quiz: Using Python’s pip

REAL PYTHON

Quiz: Python Virtual Environments

REAL PYTHON

Articles & Tutorials Python 3.13 Preview: A Modern REPL

In this tutorial, you’ll explore one of Python 3.13’s new features: a new and modern interactive interpreter, also known as a REPL.
REAL PYTHON

When Should You Upgrade to Python 3.13?

This post talks about the pros and cons of upgrading to Python 3.13 and why you might do it immediately or wait for the first patch release in December.
ITAMAR TURNER-TRAURING

Refactoring Python With Tree-Sitter & Jedi

Jack was toying around with a refactor where he wanted to replace a variable name across a large number of files. His usual tools of grep and sed weren’t sufficient, so he tried tree-sitter instead. Associated HN Discussion.
JACK EVANS

rerankers: A Lightweight Library to Unify Ranking Methods

Information retrieval often uses a two-stage pipeline, where the first stage does a quick pass and the second re-ranks the content. This post talks about re-ranking, the different methods out there, and introduces a Python library to help you out.
BENJAMIN CLAVIE

Counting Sheeps With Contracts in Python

A code contract is a way of specifying how your code is supposed to perform. They can be useful for tests and to generally reduce the number of bugs in your code. This article introduces you to the concept and the dbc library.
LÉO GERMOND

Paying Down Tech Debt: Further Learnings

Technical debt is the accumulation of design decisions that eventually slow teams down. This post talks about two ways to pay it down: using tech debt payments to get into the flow, and what you need before doing a big re-write.
GERGELY OROSZ

Asyncio gather() in the Background

The asyncio.gather() method works as the meeting point for multiple co-routines, but it doesn’t have to be a synchronous call. This post teaches you how to use .gather() in the background.
JASON BROWNLEE

Advanced Python import Techniques

The Python import system is as powerful as it is useful. In this in-depth video course, you’ll learn how to harness this power to improve the structure and maintainability of your code.
REAL PYTHON course

Mentors

Ryan just finished his second round mentoring with the Djangonaut.Space program. This post talks about both how you can help your mentor help you, and how to be a good mentor.
RYAN CHELEY

Customising Object Creation With __new__

The dunder method __new__ is used to customise object creation and is a core stepping stone in understanding metaprogramming in Python.
RODRIGO GIRÃO SERRÃO

Prompting a User for Input

This short post shows you how to prompt your users for input with Python’s built-in input() function.
TREY HUNNER

When and How to Start Coding With Kids

Talk Python interviews Anna-Lena Popkes and they talk about how and when to teach coding to children.
TALK PYTHON podcast

Projects & Code g1: Using Llama-3.1 to Create Reasoning Chains

GITHUB.COM/BKLIEGER-GROQ

DSPy: Framework for Programming Foundation Models

GITHUB.COM/STANFORDNLP

TikTokAutoUploader: Auto Upload and Schedule TikToks

GITHUB.COM/HAZIQ-EXE

tinystatus: Tiny Status Page Generated by a Python Script

GITHUB.COM/HARSXV

django-appointment: Manage Appointment Scheduling

GITHUB.COM/ADAMSPD

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

October 2, 2024
REALPYTHON.COM

PyConZA 2024

October 3 to October 5, 2024
PYCON.ORG

Canberra Python Meetup

October 3, 2024
MEETUP.COM

Sydney Python User Group (SyPy)

October 3, 2024
SYPY.ORG

PyCon ES 2024

October 4 to October 6, 2024
PYCON.ORG

Django Day Copenhagen 2024

October 4 to October 5, 2024
DJANGODAY.DK

PyCon Uganda 2024

October 9 to October 14, 2024
PYCON.ORG

PyCon NL 2024

October 10 to October 11, 2024
PYCON.ORG

Happy Pythoning!
This was PyCoder’s Weekly Issue #649.
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

PyCharm: Python 3.13 and the Latest Trends: A Developer’s Guide to 2025

Tue, 2024-10-01 15:10

We invite you to join us in just two days time, on October 3 at 5:00 pm CEST (11:00 am EDT), for a livestream shining a spotlight on Python 3.13 and the trends shaping its development.

Our speakers:

  • Łukasz Langa, CPython Developer in Residence, release manager for Python 3.8–3.9, and creator of Black.
  • Tania Allard, Vice-chair of the PSF board, PSF fellow, and Director at Quansight Labs.

They will discuss the most notable features of Python 3.13 and examine the industry trends likely to influence its future. This is a great opportunity to get ahead of the release and ask your questions directly to the experts.

Don’t forget to enable YouTube notifications and mark your calendar.

Categories: FLOSS Project Planets

PyCharm: PyCharm’s Interactive Tables for Data Science

Tue, 2024-10-01 10:32

Data cleaning, exploration, and visualization are some of the most time-consuming tasks for data scientists. Nearly 50% of data specialists dedicate 30% or more of their time to data preparation. The pandas and Polars libraries are widely used for these purposes, each offering unique advantages. PyCharm supports both libraries, enabling users to efficiently explore, clean, and visualize data, even with large datasets.

In this blog post, you’ll discover how PyCharm’s interactive tables can enhance your productivity when working with either Polars or pandas. You will also learn how to perform many different data exploration tasks without writing any code and how to use JetBrains AI Assistant for data analysis.

Getting started 

To start using pandas for data analysis, import the library and load data from a file using pd.read_csv(“FileName”), or drag and drop a CSV file into a Jupyter notebook. If you’re using Polars, import the library and use pl.read_csv(“FileName/path to the file”) to load data into a DataFrame. Then, print the dataset just by using the name of the variable.

PyCharm’s interactive tables – key features and uses Browse, sort, and view datasets

Interactive tables offer a wide range of features that allow you to easily explore your data. For example, you can navigate through your data with infinite horizontal and vertical scrolling, use single and multiple column sorting, and many other features.

This feature allows you to sort columns alphabetically or maintain the existing column order. You can also find specific columns by typing the column name in the Column List menu. Through the context menu or Column List, you can selectively hide or display columns. For deeper analysis, you can hide all but the essential columns or use the Hide Other Columns option to focus on a single column.

Finally, you can open your dataframe in a separate window for even more in-depth analysis.

Explore your data 

You can easily understand data types directly from column headers. For example, is used for a data type object, while indicates numeric data.

Additionally, you can access descriptive statistics by hovering over column headers in Compact mode or view them directly in Detailed mode, where distribution histograms are also available.

Create code-free data visualizations

Interactive tables also offer several features available in the Chart view section.

  • No-code chart creation, allowing you to visualize data effortlessly.
  • Ability to save your charts with one click.
Use AI Assistant for data analysis and visualization

You can access the AI Assistant in the upper-left corner of the tables for the following purposes:

  • To access insights about your data quickly with AI Assistant.
  • Use AI Assistant to visualize your data.
Using interactive tables for reliable Exploratory Data Analysis (EDA) Why is EDA important? 

Exploratory Data Analysis (EDA) is a crucial step in data science, as it allows data scientists to understand the underlying structure and patterns within a dataset before applying any modeling techniques. EDA helps you identify anomalies, detect outliers, and uncover relationships among variables – all of which are essential for making informed decisions.

Interactive tables offer many features that allow you to explore your data faster and get reliable results.

Spotting statistics, patterns, and outliers  Viewing the dataset information

Let’s look at a real-life example of how the tables could boost the productivity of your EDA. For this example, we will use the Bengaluru House Dataset. Normally we start with an overview of our data. This includes just viewing it to understand the size of the dataset, data types of the columns, and so on. While you can certainly do this with the help of code, using interactive tables allows you to get this data without code. So, in our example, the size of the dataset is 13,320 rows and 9 columns, as you can see in the table header.

Our dataset also contains different data types, including numeric and string data. This means we can use different techniques for working with data, including correlation analysis and others.

And of course you can take a look at the data with the help of infinite scrolling and other features we mentioned above.

Performing statistical analysis

After getting acquainted with the data, the next step might be more in-depth analysis of the statistics. PyCharm provides a lot of important information about the columns in the table headers, including missing data, mode, mean, median, and so on.
For example, here we see that many columns have missing data. In the “bath” column, we obviously have an outlier, as the max value significantly exceeds the 95th percentile.

Additionally, data type mismatches, such as “total_sqft” not being a float or integer, indicate inconsistencies that could impact data processing and analysis.

After sorting, we notice one possible reason for the problem: the use of text values in data and ranges instead of normal numerical values.

Analyzing the data using AI

Additionally, if our dataset doesn’t have hundreds of columns, we can use the help of AI Assistant and ask it to explain the DataFrame. From there, we can prompt it with any important questions, such as “What data problems in the dataset should be addressed and how?”

Visualizing data with built-in charting

In some cases, data visualization can help you understand your data. PyCharm interactive tables provide two options for that. The first is Chart View and the second is Generate Visualizations in Chat

Let’s say my hypothesis is that the price of a house should be correlated with its total floor area. In other words, the bigger a house is, the more expensive it should be. In this case, I can use a scatter plot in Chart View and discover that my hypothesis is likely correct.

Wrapping up

PyCharm Professional’s interactive tables offer numerous benefits that significantly boost your productivity in data exploration and data cleaning. The tables allow you to work with the most popular data science library, pandas, and the fast-growing framework Polars, without writing any code. This is because the tables provide features like browsing, sorting, and viewing datasets; code-free visualizations; and AI-assisted insights.

Interactive tables in PyCharm not only save your time but also reduce the complexity of data manipulation tasks, allowing you to focus on deriving meaningful insights instead of writing boilerplate code for basic tasks.

Download PyCharm Professional and get an extended 60-day trial by using the promo code “PyCharmNotebooks”. The free subscription is available for individual users only.

Activate your 60-day trial

For more information on interactive tables in PyCharm, check out our related blogs, guides, and documentation:

Categories: FLOSS Project Planets

Real Python: Differences Between Python's Mutable and Immutable Types

Tue, 2024-10-01 10:00

As a Python developer, you’ll have to deal with mutable and immutable objects sooner or later. Mutable objects are those that allow you to change their value or data in place without affecting the object’s identity. In contrast, immutable objects don’t allow this kind of operation. You’ll just have the option of creating new objects of the same type with different values.

In Python, mutability is a characteristic that may profoundly influence your decision when choosing which data type to use in solving a given programming problem. Therefore, you need to know how mutable and immutable objects work in Python.

In this video course, you’ll:

  • Understand how mutability and immutability work under the hood in Python
  • Explore immutable and mutable built-in data types in Python
  • Identify and avoid some common mutability-related gotchas
  • Understand and control how mutability affects your custom classes

[ 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: I won two British Cartographic Society awards!

Tue, 2024-10-01 09:13

It’s been a while since I posted here – I kind of lost momentum over the summer (which is a busy time with a school-aged child) and never really picked it up again.

Anyway, I wanted to write a quick post to tell people that I won two awards at the British Cartographic Society awards ceremony a few weeks ago.

They were both for my British Placename Mapper web app, which is described in more detail in this blog post. If you haven’t seen it already, I strongly recommend you check it out.

I won a Highly Commended certificate in the Avenza Award for Electronic Mapping, and the First Prize trophy for the Ordnance Survey Award (for any map using OS data).

The certificates came in a lovely frame, and the trophy is enormous – about 30cm high and weighing over 3kg!

Here’s the trophy:

I was presented with the trophy at the BCS Annual Conference in London, but they very kindly offered to keep the trophy to save me carrying it across London on my wheelchair and back on the train, so they invited me to Ordnance Survey last week to be presented with it again. I had a lovely time at OS – including 30 minutes with their Director General/CEO and was formally presented with my trophy again (standing in front of the first ever Ordnance Survey map!):

Full information on the BCS awards are available on their website and I strongly recommend submitting any appropriate maps you’ve made for next year’s awards. I need to get my thinking cap on for next year’s entry…

Categories: FLOSS Project Planets

Python Insider: Python 3.12.7 released

Tue, 2024-10-01 08:32

  

I'm pleased to announce the release of Python 3.12.7:

https://www.python.org/downloads/release/python-3127/

 This is the seventh maintenance release of Python 3.12

Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.7 is the latest maintenance release, containing more than 100 bugfixes, build improvements and documentation changes since 3.12.6.

 Major new features of the 3.12 series, compared to 3.11 New featuresType annotationsDeprecations
  • The deprecated wstr and wstr_length members of the C implementation of unicode objects were removed, per PEP 623.
  • In the unittest module, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2).
  • The deprecated smtpd and distutils modules have been removed (see PEP 594 and PEP 632. The setuptools package continues to provide the distutils module.
  • A number of other old, broken and deprecated functions, classes and methods have been removed.
  • Invalid backslash escape sequences in strings now warn with SyntaxWarning instead of DeprecationWarning, making them more visible. (They will become syntax errors in the future.)
  • The internal representation of integers has changed in preparation for performance enhancements. (This should not affect most users as it is an internal detail, but it may cause problems for Cython-generated code.)

For more details on the changes to Python 3.12, see What’s new in Python 3.12.

 More resources Enjoy the new releases

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.


Your release team,
Thomas Wouters
Łukasz Langa
Ned Deily
Steve Dower

Categories: FLOSS Project Planets

Python Insider: Python 3.13.0 release candidate 3 released

Tue, 2024-10-01 08:29

I'm pleased to announce the release of Python 3.13 release candidate 3 (instead of the expected final release).

https://www.python.org/downloads/release/python-3130rc3/

 

This is the final release candidate of Python 3.13.0

This release, 3.13.0rc3, is the final release preview (no really) of 3.13. This release is expected to become the final 3.13.0 release, barring any critical bugs being discovered. The official release of 3.13.0 is now scheduled for Monday, 2024-10-07.

This extra, unplanned release candidate exists because of a couple of last minute issues, primarily a significant performance regression in specific workloads due to the incremental cyclic garbage collector (introduced in the alpha releases). We decided to roll back the garbage collector change in 3.13 (and continuing work in 3.14 to improve it), apply a number of other important bug fixes, and roll out a new release candidate.

There will be no ABI changes from this point forward in the 3.13 series (and there haven't been any since the beta releases).

Call to action

We strongly encourage maintainers of Python projects to prepare their projects for 3.13 compatibilities during this phase, and where necessary publish Python 3.13 wheels on PyPI to be ready for the final release of 3.13.0. Any binary wheels built against Python 3.13.0rc1 and later will work with future versions of Python 3.13. As always, report any issues to the Python bug tracker.

Please keep in mind that this is a preview release and while it’s as close to the final release as we can get it, its use is not recommended for production environments.

Core developers: time to work on documentation now
  • Are all your changes properly documented?
  • Are they mentioned in What’s New?
  • Did you notice other changes you know of to have insufficient documentation?
 Major new features of the 3.13 series, compared to 3.12

Some of the new major new features and changes in Python 3.13 are:

New featuresTypingRemovals and new deprecations
  • PEP 594 (Removing dead batteries from the standard library) scheduled removals of many deprecated modules: aifc, audioop, chunk, cgi, cgitb, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib, lib2to3.
  • Many other removals of deprecated classes, functions and methods in various standard library modules.
  • C API removals and deprecations. (Some removals present in alpha 1 were reverted in alpha 2, as the removals were deemed too disruptive at this time.)
  • New deprecations, most of which are scheduled for removal from Python 3.15 or 3.16.

(Hey, fellow core developer, if a feature you find important is missing from this list, let Thomas know.)

For more details on the changes to Python 3.13, see What’s new in Python 3.13. The next release of Python 3.13 will be the official 3.13.0 release, currently scheduled for Monday, 2024-10-07.

 More resources Enjoy the new releases

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.

Your release team,

Thomas Wouters
Łukasz Langa
Ned Deily
Steve Dower

Categories: FLOSS Project Planets

Real Python: Quiz: When to Use a List Comprehension in Python

Tue, 2024-10-01 08:00

In this quiz, you’ll test your understanding of List Comprehension in Python.

By working through this quiz, you’ll revisit how to rewrite loops as list comprehensions, how to choose when to use list comprehensions, how you can use conditional logic in your comprehensions, and how to profile your code to resolve performance questions.

[ 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

Tryton News: Newsletter September 2024

Tue, 2024-10-01 02:00

During the last month we mainly focus on bug fixes, behaviour improvements of several things and speeding-up performance issues stepping forward to our next release 7.4 scheduled to the 4th of November. We also added some new features which we would like to introduce to you in this newsletter.

For an in depth overview of the Tryton issues please take a look at our issue tracker or see the issues and merge requests filtered by label.

Changes for the User Sales, Purchases and Projects

We add a new sale reporting per promotion.

We add now a relate from promotions to their sales.

We improved the exception handling wizards on sales and purchases. We added two fields to let the user explicitly fill with the records to ignore or to re-create.
Any cancelled record that is not added to one of the fields, will stay in exception state to be proceeded later. Also we changed the view between a MultiSelection to a Many2Many field depending on the number of records in the exception state.

Now, Tryton doesn’t add extra lines on sale orders for inactive products. Also Tryton does no longer recommend inactive products.

We removed the Menu: Parties → Parties → Parties Associated to Sales/Purchases entries, because the result is not limited to sales or purchases in state validated or processing. A draft, quotation or cancelled order doesn’t qualify a party as a customer or supplier. The functionality is already replaced by the reports in Menu: Sales → Reporting → Sales, Sales per Customer and Menu: Purchases → Reporting → Purchases, Purchases per Supplier which adds the ability to filter per state and per period.

Accounting, Invoicing and Payments

Now we re-launch the update of the payment customer for Stripe and Braintree in case it failed. Also the users can manually initiate the update process.

Stock, Production and Shipments

Now we round up weights and the other measurements to two decimals for the shipping carriers DPD, Sendcloud and UPS.

We make package measurements read-only once they are closed.

User Interface

We remove the favourite management from the favourite menu, because of
several issues [1] [2] and duplicated functionality.

Now we group links with a similar functional scope together.

In Menu: Administration → User Interface the entries

  • View Tree Widths,
  • View Tree Optionals,
  • View Tree States and
  • View Searches

are moved to the Open related records toolbar-menu of Menu: Administration → Models → Models.

We improve the widget for MultiSelection fields in the Tryton clients by adding checkboxes which display the selection state of the row. If the users clicks on a row, the selection state will be changed.

Now we visually remove records from Many2Many fields used in Wizard instead of greying them out.

We keep the CSV export dialogue now opened after exporting, to have a better user experience when fixing bugs, export and again fixing bugs.

Since we moved the functionality from product_price_list_dates to product_price_list, you can open price list lines in a new tab to be able to filtering, search or import import them.

New Documentation or Naming

We improved and unified the stock action naming and re-worked documentation:

New Releases

We released bug fixes for the currently maintained long term support series
7.0 and 6.0, and for the penultimate series 7.2.

Security

Please update your systems to take care of a security related bug we found last month: trytond allows to execute reports for records for which the user has no read access and also for reports limited to a set of groups that the user is not member of.

Changes for the System Administrator

Now we use a random value for cron next call field when no value is defined.

Now we log the last cron scheduler runs and their durations. A new cron task periodically cleans the log entries. The new cron-section configuration variable clean_days (default 30) sets this period.

Changes for Implementers and Developers

The Tryton view-tests now check for some more attributes like sequence and on_write in tree-views or dtstart and dtend in calendar-views.

Now we unify the term “email”, as it is now the most common and recommended form.

We add to all “cost”-terms a “sale”-suffix in sale shipment cost fields to improve the naming convention and to avoid collisions or misinterpretations.

Authors: @dave @pokoli @udono

1 post - 1 participant

Read full topic

Categories: FLOSS Project Planets

William Minchin: u202409302311

Tue, 2024-10-01 01:11

Summary plugin for Pelican v1.3.0 released! Now keeps internal link indicators (like {filename}) from leaking into summaries. on PyPI

Categories: FLOSS Project Planets

William Minchin: u202409301853

Mon, 2024-09-30 20:53

CommonMark Pelican reader v2.0.1! Should stop complaining about intra-document links (e.g. #target) on PyPI

Categories: FLOSS Project Planets

Python Morsels: Converting a string to a datetime

Mon, 2024-09-30 13:30

The datetime.strptime class method can parse a date/time string into a datetime object.

Table of contents

  1. Parsing strings into datetime objects ➡️
  2. The strptime formatting directives 📑
  3. Just parse my string please! ⚡
  4. What time is it? It's "string parse time" ⏱️
  5. Converting a datetime into a string ⬅️
  6. strptime parses and strftime formats 🔄
  7. f-strings for datetime formatting ✨
  8. strptime for date and time objects? 🤔
  9. Parse with str-p-time, format with str-f-time 📝

Parsing strings into datetime objects ➡️

Here's an example of the strptime class method in action:

>>> from datetime import datetime >>> datetime.strptime("Jun 1 2005 1:33PM", "%b %d %Y %I:%M%p") datetime.datetime(2005, 6, 1, 13, 33)

Note that strptime is a class method: we're calling it on the datetime class (not an instance of the class).

The strptime formatting directives 📑

Those single letter % codes …

Read the full article: https://www.pythonmorsels.com/converting-a-string-to-a-datetime/
Categories: FLOSS Project Planets

Kushal Das: Breaking out of algorithm

Mon, 2024-09-30 12:16

Many of you already know about my love of photography. I am taking photos for many years, mostly people photos. Portraits in conferences like PyCon or Fedora events. I regularly post photos to wikipedia too, specially for the people/accounts which does not have good quality profile photos. I stopped doing photography as we moved to Sweden, digital camera was old and becoming stable in a new country (details in a different future blog) takes time. But, last year Anwesha bought me a new camera, actually two different cameras. And I started taking photos again.

I started regular photos of the weekly climate protests / demonstrations of Fridays for Future Stockholm group. And then more different street protests and some dance/music events too. I don't have a Facebook account and most people asked me to share over Instagram, so I did that. But, as I covered more & more various protests as a photographer, I noticed my Instagram postos are showing up less in people's feeds. Very less. Was wondering different ways of breaking out of the algorithmic restriction.

Pixelfed is a decentralized, federated ActivityPub based system to share photos. I am going to share photos more on this platform, and hoping people will slowly see more. I started my account yesterday.

You can follow me from any standard ActivityPub system, say your mastodon account itself. Search for @kushal@pixel.kushaldas.photography or https://pixel.kushaldas.photography/kushal in your system and you can then follow it like any other account. If you like the photos, then please share the account (or this blog post) more to your followers and help me to break out of the algorithmic restrictions.

In the technology side, the server runs Debian and containers. On my Fedora system I am super happy to add a few scripts for Gnome Files, they help me to resize the selected images before upload (I will write a blog post tomorrow on this).

Categories: FLOSS Project Planets

Real Python: Python 3.13: Cool New Features for You to Try

Mon, 2024-09-30 10:00

Python 3.13 will be published on October 1, 2024. This new version is a major step forward for the language, although several of the biggest changes are happening under the hood and won’t be immediately visible to you.

In a sense, Python 3.13 is laying the groundwork for some future improvements, especially to the language’s performance. As you read on, you’ll learn more about the background for this and dive into some new features that are fully available now.

In this tutorial, you’ll learn about some of the improvements in the new version, including:

  • Improvements made to the interactive interpreter (REPL)
  • Clearer error messages that can help you fix common mistakes
  • Advancements done in removing the global interpreter lock (GIL) and making Python free-threaded
  • The implementation of an experimental Just-In-Time (JIT) compiler
  • A host of minor upgrades to Python’s static type system

If you want to try any of the examples in this tutorial, then you’ll need to use Python 3.13. The tutorials Python 3 Installation & Setup Guide and How Can You Install a Pre-Release Version of Python? walk you through several options for adding a new version of Python to your system.

In addition to learning more about the new features coming to the language, you’ll also get some advice about what to consider before upgrading to the new version. Click the link below to download code examples demonstrating the new capabilities of Python 3.13:

Get Your Code: Click here to download the free sample code that shows you how to use the new features in Python 3.13.

Take the Quiz: Test your knowledge with our interactive “Python 3.13: Cool New Features for You to Try” quiz. You’ll receive a score upon completion to help you track your learning progress:

Interactive Quiz

Python 3.13: Cool New Features for You to Try

In this quiz, you'll test your understanding of the new features introduced in Python 3.13. By working through this quiz, you'll review the key updates and improvements in this version of Python.

An Improved Interactive Interpreter (REPL)

If you run Python without specifying any script or code, you’ll find yourself inside Python’s interactive interpreter. This interpreter is informally called the REPL because it’s based on a read-evaluate-print loop. The REPL reads your input, evaluates it, and prints the result before looping back and doing the same thing again.

The Python REPL has been around for decades, and it supports an explorative workflow that makes Python a beginner-friendly language. Unfortunately, the interpreter has been missing several features you may have come to expect, including multiline editing and efficient pasting of code.

Note: Experienced Python developers often install a third-party interactive interpreter instead of relying on the built-in REPL. You can learn more about the alternatives in these tutorials:

You can also read more about alternative REPLs in the guide to the standard REPL.

Begin by starting the REPL. You can do this by typing python in your terminal. Depending on your setup, you may have to write py, python3, or even python3.13 instead. One way to recognize that you’re using the new interpreter shipping with Python 3.13 is that the prompt consisting of three chevrons (>>>) is subtly colored:

One improvement is that you can now use REPL-specific commands without calling them with parentheses as if they are Python functions. Here are some of the commands and keyboard shortcuts you can use:

  • exit or quit: Exit the interpreter
  • clear: Clear the screen
  • help or F1: Access the help system
  • F2: Open the history browser
  • F3: Enter paste mode

You can learn more about these options in Python 3.13 Preview: A Modern REPL.

Recalling code you’ve written earlier has been cumbersome in the REPL before Python 3.13, especially if you’re working with a block of code spanning several lines. Traditionally, you’ve had to bring back each line one by one by repeatedly pressing Up. Now in 3.13, you can bring back the whole block of code with a single Up keystroke.

To try this for yourself, enter the following code in your REPL:

Python >>> numbers = range(3, 13) >>> [ ... (number - 3)**3 for number in numbers ... if number % 2 == 1 ... ] [0, 8, 64, 216, 512] Copied!

You’re creating a somewhat complex list comprehension that calculates an offset cube of a range of numbers, but only if the numbers are odd. The important part is that for readability, you split the list comprehension over several lines. Now try hitting that Up key! The interpreter recalls all four lines at once, and you can continue to use your arrow keys to move around inside of the expression.

You can make changes to your code and run it again. To execute the updated code, you need to move your cursor to the end of the last line in the code block. If you press Enter inside the expression, you’ll create a new empty line instead:

The ability to recall and edit multiline statements is a huge time-saver and will make you more efficient when working with the REPL.

Another convenience coming in Python 3.13 is proper support for pasting code. In Python 3.12 and earlier, you’d need to make sure that your code doesn’t contain any blank lines before you could copy and paste it. In the new version, pasted code is treated as a unit and executes just as it would inside a script.

Read the full article at https://realpython.com/python313-new-features/ »

[ 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

PyCharm: What’s the Big Deal About Endpoints for Python Web Development?

Mon, 2024-09-30 09:38

Python has almost 30 years of history doing Python web development. Can you believe it? But 3-tier web projects have gotten really complicated and stressful. You’re busy, everything is all over the place – it’s hard!

But PyCharm is here to help: bring your work together with the Endpoints tool window. I just made a video explainer:

Try the Endpoints tool window!

Here are 3 things from the video that I really like about endpoints. Plus a bonus point at the end.

First…where is everything?

Python web projects can get really big, really fast. If you’re like me, it can be overwhelming – and exhausting. I really need a “helper brain” – one that deeply understands each web framework – to stitch everything together.

PyCharm has long provided icons to navigate from a view to a template, and vice versa. Endpoints adds icons to jump from a view to the route definition, to the parent context, and generate a request to this API.

I like to use my keyboard instead of the mouse. Good news – endpoints is wired into searchable actions.

Want a birds-eye view of all your endpoints? The Endpoints tool window shows all your APIs, with filtering by subapp, type, and framework.

It’s more than a list. Each entry lets you jump to the endpoint and perform operations.

These operations have framework-specific smarts, such as knowing the “parent context” for Django vs. Flask vs. FastAPI.

I like having this tool window when I’m thinking about the whole application. But I like even more how endpoints brings these operations into the editor, to my cursor, helping me focus.

Bring IDE smarts, into APIs

Our IDE has deep insight to connect the dots in Python development. What if we applied that to Python web frameworks?

I can’t remember all my API names. Endpoints gives me autocomplete in the HTTP client and even in JavaScript fetch.

Thanks to endpoints, these routes become symbols. I’m a symbol-first coder, using autocomplete, warnings, and navigation to the max. Now I can apply that with the web framework syntax for APIs.

Discover more powerful web development features Stay in one tool

I’ve always liked the “I” in IDE: integrating my important workflows into a single, consistent experience. Web development can mean bouncing around between lots of windows. What if we could bring that workflow into PyCharm?

We already brought best-in-class frontend development from WebStorm and database development from DataGrip.

Using our HTTP Client, you have a productive, mature workflow for issuing HTTP requests. No need to go to the browser or purchase another tool. With endpoints, HTTP Client gets easier and smarter. For example, issue an HTTP request, directly from the API listing.

As shown above, writing these HTTP requests is easier thanks to autocomplete, as endpoints knows your web framework and its route definitions.

You can also browse the OpenAPI documentation of your endpoint without going to a browser.

The “I” in IDE means it is one team that is bringing these features across web frameworks. When I learn a way of working once, I can use it when I shift to a project with another supported web framework. Same features, same UI.

Innovation in Python web development

Python web development needs fresh new ideas and with it, new thinking in tooling. Endpoints says: “You are going to use multiple frameworks on lots of big projects. Let’s step back, focus on the problem, re-imagine the workflow, and throw a bunch of powerful IDE machinery at it.”

Just this one tool window has so much value in it: a listing of your API, with info about HTTP method, and right-click available for each. Then, tabs for the common operations, keeping you in the IDE and in the flow.

So that’s endpoints, a vision from PyCharm to make API development joyful and productive. Give it a try and let us know what you think.

Try the Endpoints tool window!
Categories: FLOSS Project Planets

Python Bytes: #403 A machine learning algorithm walks into a bar…

Mon, 2024-09-30 04:00
<strong>Topics covered in this episode:</strong><br> <ul> <li><strong><a href="https://simonwillison.net/2024/Sep/8/uv-under-discussion-on-mastodon/?featured_on=pythonbytes">uv under discussion on Mastodon</a></strong></li> <li><strong><a href="https://github.com/drivendataorg/erdantic?featured_on=pythonbytes">erdantic: Entity Relationship Diagrams</a></strong></li> <li><strong>Extra, Extra, Extra</strong></li> <li><strong>Django Extra, Extra, Extra</strong></li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=nqVZVvXcOps' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="403">Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/?featured_on=pythonbytes"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://courses.pythontest.com/p/the-complete-pytest-course?featured_on=pythonbytes"><strong>The Complete pytest Course</strong></a></li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <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 <strong>Monday</strong> 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>Michael #1:</strong> <a href="https://simonwillison.net/2024/Sep/8/uv-under-discussion-on-mastodon/?featured_on=pythonbytes">uv under discussion on Mastodon</a></p> <ul> <li>It’s interesting that uv is slightly controversial</li> <li><p><a href="https://cloudisland.nz/@freakboy3742/113093889194737339?featured_on=pythonbytes">Russell</a>:</p></li> <li><p>As enthusiastic as I am about the direction uv is going, I <em>haven't</em> adopted them anywhere - because I want very much to understand Astral’s intended business model before I hook my wagon to their tools.</p></li> <li><p><a href="https://mastodon.social/@hynek/113094437303343866?featured_on=pythonbytes">Hynek</a>:</p></li> <li><p>As much as I hate VC, [...] FOSS projects flame out all the time too. … To me uv looks like a genius sting to trick VCs into paying to fix packaging. We’ll be better off either way.</p></li> <li><p><a href="https://mastodon.social/@glyph/113094489295782200?featured_on=pythonbytes">Glyph</a>:</p></li> <li><p>Rust is more expensive and difficult to maintain, not to mention "non-native" to the average customer here. … it can burn out <em>all</em> the other projects in the ecosystem simultaneously, creating a risk of monoculture</p></li> <li><p><a href="https://mastodon.social/@hynek/113094547139925962?featured_on=pythonbytes">Hynek on Rust</a>:</p></li> <li><p>I don’t think y’all quite grok what uv makes so special due to your seniority. The speed is really cool, but the reason Rust is elemental is that it’s one compiled blob that can be used to bootstrap and maintain a Python development.</p></li> <li><p><a href="https://social.coop/@chrisjrn/113094511860843571?featured_on=pythonbytes">Christopher Neugebauer</a>:</p></li> <li><p>Just dropping in here to say that corporate capture of the Python ecosystem is the #1 keeps-me-up-at-night subject in my community work, so I watch Astral with interest, even if I'm not yet too worried.</p></li> <li><p><a href="https://lucumr.pocoo.org/2024/8/21/harvest-season/?featured_on=pythonbytes">Armin Ronacher</a></p></li> <li><p>What uv is doing, even in the worst possible future this is a very forkable and maintainable thing.</p></li> <li><p>Finally, see the comment at the end by Charlie Marsh</p></li> </ul> <p><strong>Brian #2:</strong> <a href="https://github.com/drivendataorg/erdantic?featured_on=pythonbytes">erdantic: Entity Relationship Diagrams</a></p> <ul> <li>“erdantic is a simple tool for drawing entity relationship diagrams (ERDs) for Python data model classes. Diagrams are rendered using the venerable Graphviz library.”</li> <li>Supported data modeling frameworks are: <ul> <li>Pydantic V2</li> <li>Pydantic V1 legacy</li> <li>attrs</li> <li>dataclasses </li> </ul></li> </ul> <p><strong>Michael #3:</strong> <strong>Extra, Extra, Extra</strong></p> <ul> <li>Added <a href="https://search.pythonbytes.fm/api/browser">Python Bytes Search as a custom search engine</a>.</li> <li><a href="https://mkennedy.codes/posts/passkey-great-but-careful-of-the-lock-in/?featured_on=pythonbytes">Along came passkeys. A cool idea that quickly turned evil.</a></li> <li>Follow up from post and my conversation last week: <a href="https://github.com/dani-garcia/vaultwarden?featured_on=pythonbytes">vaultwarden</a> (via <a href="https://x.com/mkennedy/status/1838974519463334163?featured_on=pythonbytes">Pablo</a>)</li> <li><a href="https://github.com/astral-sh/uv/releases/tag/0.4.16?featured_on=pythonbytes">uv publish</a></li> <li>Trying the <a href="https://help.vivaldi.com/desktop/tabs/tab-display/?featured_on=pythonbytes">tabs on bottom lifestyle</a> inspired by Arc</li> <li>Adding <a href="https://search.pythonbytes.fm/api/browser">Python Bytes</a> (and Talk Python) <a href="https://mkennedy.codes/posts/you-should-use-custom-search-engines-way-more/?featured_on=pythonbytes">as custom search engines</a>.</li> <li><a href="https://www.python.org/events/python-events/1507/?featured_on=pythonbytes">PyCon 2025 dates</a>: From 14 May through 22 May, 2025</li> </ul> <p><strong>Brian #4:</strong> Django Extra, Extra, Extra</p> <ul> <li><a href="https://blog.jetbrains.com/pycharm/2024/09/django-project-ideas/?featured_on=pythonbytes">Django Project Ideas</a> <ul> <li>Evgenia Verbina</li> <li>Project ideas with list of tech stack stuff you’ll learn and/or work on with the project</li> <li>Ex: Recipe organizer <ul> <li>tech stack: Django templates, Django ORM, Optional JavaScript</li> <li>“Familiarize yourself with Django’s ORM (object-relational mapper) and database support by building an app to keep track of your favorite recipes. Add a web-based frontend with options to filter recipes by category, ingredients, and user ratings so you can easily browse for inspiration.”</li> </ul></li> </ul></li> <li><a href="https://djangotv.com?featured_on=pythonbytes">DjangoTV</a> <ul> <li>Jeff Triplett</li> <li>Django conference videos and tutorials.</li> </ul></li> <li><a href="https://github.com/django-commons?featured_on=pythonbytes">Django Commons</a> <ul> <li>Heard about from Lacey Henschel</li> <li>“Django Commons is an organization dedicated to supporting the community's efforts to maintain packages. It seeks to improve the maintenance experience for all contributors; reducing the barrier to entry for new contributors and reducing overhead for existing maintainers.”</li> </ul></li> <li><a href="https://docs.djangoproject.com/en/5.1/releases/5.0/#simplified-templates-for-form-field-rendering">Django 5 has simplified templates for better form field rendering</a></li> <li>But if you want a completely different take on forms, maybe try <a href="https://docs.iommi.rocks/en/latest/forms.html?featured_on=pythonbytes">iommi forms</a> <ul> <li>They wrote about it on <a href="https://kodare.net/2024/09/11/why-we-wrote-a-new-form-library-for-django.html?featured_on=pythonbytes">Why we wrote a new form library for Django</a></li> </ul></li> <li><a href="https://adamj.eu/tech/2024/09/26/django-introducing-djade/?featured_on=pythonbytes">Djade: a Django template formatter</a> <ul> <li>Adam Johnson</li> <li>Like black or ruff, but for Django templates.</li> </ul></li> </ul> <p><strong>Extras</strong> </p> <p>Brian:</p> <ul> <li><a href="https://liamwhite.dev/posts/0035-hostile-source-environment?featured_on=pythonbytes"><strong>The Open Source Project Maintainer's Guide</strong></a> <ul> <li>Suggested by Rafael Weingartner</li> </ul></li> </ul> <p><strong>Joke:</strong> <a href="https://devhumor.com/media/a-machine-learning-algorithm-walks-into-a-bar?featured_on=pythonbytes">A Machine Learning algorithm walks into a bar…</a></p>
Categories: FLOSS Project Planets

eGenix.com: Python Meeting Düsseldorf - 2024-10-02

Mon, 2024-09-30 04:00

The following text is in German, since we're announcing a regional user group meeting in Düsseldorf, Germany.

Ankündigung

Das nächste Python Meeting Düsseldorf findet an folgendem Termin statt:

02.10.2024, 18:00 Uhr
Raum 1, 2.OG im Bürgerhaus Stadtteilzentrum Bilk
Düsseldorfer Arcaden, Bachstr. 145, 40217 Düsseldorf


Programm Bereits angemeldete Vorträge
  • Detlef Lannert:
    pyinfra als Alternative zu Ansible
  • Marc-André Lemburg:
    Rapid web app development with Panel
  • Detlef Lannert:
    Low-cost-Objekte als Alternativen zu Dictionaries?
  • Charlie Clark:
    Editieren von ZIP Dateien mit Python
Weitere Vorträge können gerne noch angemeldet werden. Bei Interesse, bitte unter info@pyddf.de melden. Startzeit und Ort

Wir treffen uns um 18:00 Uhr im Bürgerhaus in den Düsseldorfer Arcaden.

Das Bürgerhaus teilt sich den Eingang mit dem Schwimmbad und befindet sich an der Seite der Tiefgarageneinfahrt der Düsseldorfer Arcaden.

Über dem Eingang steht ein großes "Schwimm’ in Bilk" Logo. Hinter der Tür direkt links zu den zwei Aufzügen, dann in den 2. Stock hochfahren. Der Eingang zum Raum 1 liegt direkt links, wenn man aus dem Aufzug kommt.

>>> Eingang in Google Street View

⚠️ Wichtig: Bitte nur dann anmelden, wenn ihr absolut sicher seid, dass ihr auch kommt. Angesichts der begrenzten Anzahl Plätze, haben wir kein Verständnis für kurzfristige Absagen oder No-Shows. Einleitung

Das Python Meeting Düsseldorf ist eine regelmäßige Veranstaltung in Düsseldorf, die sich an Python Begeisterte aus der Region wendet.

Einen guten Überblick über die Vorträge bietet unser PyDDF YouTube-Kanal, auf dem wir Videos der Vorträge nach den Meetings veröffentlichen.

Veranstaltet wird das Meeting von der eGenix.com GmbH, Langenfeld, in Zusammenarbeit mit Clark Consulting & Research, Düsseldorf:

Format

Das Python Meeting Düsseldorf nutzt eine Mischung aus (Lightning) Talks und offener Diskussion.

Vorträge können vorher angemeldet werden, oder auch spontan während des Treffens eingebracht werden. Ein Beamer mit HDMI und FullHD Auflösung steht zur Verfügung.

(Lightning) Talk Anmeldung bitte formlos per EMail an info@pyddf.de

Kostenbeteiligung

Das Python Meeting Düsseldorf wird von Python Nutzern für Python Nutzer veranstaltet.

Da Tagungsraum, Beamer, Internet und Getränke Kosten produzieren, bitten wir die Teilnehmer um einen Beitrag in Höhe von EUR 10,00 inkl. 19% Mwst. Schüler und Studenten zahlen EUR 5,00 inkl. 19% Mwst.

Wir möchten alle Teilnehmer bitten, den Betrag in bar mitzubringen.

Anmeldung

Da wir nur 25 Personen in dem angemieteten Raum empfangen können, möchten wir bitten, sich vorher anzumelden.

Meeting Anmeldung bitte per Meetup

Weitere Informationen

Weitere Informationen finden Sie auf der Webseite des Meetings:

              https://pyddf.de/

Viel Spaß !

Marc-Andre Lemburg, eGenix.com

Categories: FLOSS Project Planets

Zato Blog: Enterprise Python: Integrating with Salesforce

Mon, 2024-09-30 03:43
Enterprise Python: Integrating with Salesforce 2024-09-30, by Dariusz Suchojad Overview

Salesforce connections are one of the newest additions to Zato 3.2, allowing you to look up and manage Salesforce records and other business data. To showcase it, the article will create a sample Salesforce marketing campaign in a way that does not require the usage of anything else except for basic REST APIs combined with plain Python objects, such as dicts.

If you have not done it already, you can download Zato here.

Basic workflow

The scope of our works will be:

  • Creating Salesforce credentials for our integration project
  • Defining a Salesforce connection in Zato
  • Authoring a service that will map input data to the format that Salesforce expects
  • Creating a Zato REST channel that will be invoked through curl during tests
  • Testing the integration
Creating Salesforce credentials

To be able to create as connection to Salesforce in the next step, we need a few credentials. There is a full article about how to prepare them and this section is the gist of it.

In runtime, based on this information, Zato will obtain the necessary authentication and authorization tokens itself, which means that you will only focus on the business side of the integrations, not on the low-level aspects of it.

The process of obtaining the credentials needs to be coordinated with an administrator of your organization. To assist in that, the screenshots below explain where to find them.

The credentials are:

  • Username and password
  • Consumer key
  • Consumer secret

The username and password are simply the same credentials that can be used to log in to Salesforce:

Consumer key and secret are properties of a connected app - this is a term that Salesforce uses for API clients that invoke its services. If you are already an experienced Salesforce REST API user, you may know the key and secret under their aliases of "client_id" and "client_secret" - these are the same objects.

Note that when a connected app already exists and you would like to retrieve the key and secret, they will be available under the "View" menu option for the app, not under "Edit" or "Manage".

Defining a Salesforce connection in Zato

With all the credentials in place, we can create a new Salesforce connection in Zato Dashboard, as below.

Authoring an integration service in Python

Above, we created a connection definition that lets Zato obtain session tokens and establish connections to Salesforce. Now, we can create an API service that will make use of such connections.

In the example below, we are using the POST REST method to invoke an endpoint that creates new Salesforce campaigns. In your own integrations, you can invoke any other Salesforce endpoint, using any REST method as needed, by following the same pattern, which is, create a model with input fields, build a Python dict for the request to Salesforce, invoke it and map all the required from the response from Salesforce to that which your own service returns to its own callers.

Note that we use a datamodel-based SimpleIO definition for the service. Among other things, although we are not going to do it here, this would let us offer definitions for this and other services.

# -*- coding: utf-8 -*- # stdlib from dataclasses import dataclass # Zato from zato.server.service import Model, Service # ########################################################################### if 0: from zato.server.connection.salesforce import SalesforceClient # ########################################################################### @dataclass(init=False) class CreateCampaignRequest(Model): name: str segment: str # ########################################################################### @dataclass(init=False) class CreateCampaignResponse(Model): campaign_id: str # ########################################################################### class CreateCampaign(Service): class SimpleIO: input = CreateCampaignRequest output = CreateCampaignResponse def handle(self): # This is our input data input = self.request.input # type: CreateCampaignRequest # Salesforce REST API endpoint to invoke - note that Zato # will add a prefix to it containing the API version. path = '/sobjects/Campaign/' # Build the request to Salesforce based on what we received request = { 'Name': input.name, 'Segment__c': input.segment, } # .. create a reference to our connection definition .. salesforce = self.cloud.salesforce['My Salesforce Connection'] # .. obtain a client to Salesforce .. with salesforce.conn.client() as client: # type: SalesforceClient # .. create the campaign now .. sf_response = client.post(path, request) # .. build our response object .. response = CreateCampaignResponse() response.campaign_id = sf_response['id'] # .. and return its ID to our caller. self.response.payload = response # ########################################################################### Creating a REST channel

Note that we assign HTTP Basic Auth credentials to the channel. In this manner, it is possible for clients of this REST channel to authenticate using a method that they are already familiar which simplifies everyone's work - it is Zato that deals with how to authenticate against Salesforce whereas your API clients use the ubiquitous HTTP Basic Auth method.

Testing

The last step is to invoke the newly created channel:

$ curl http://api:password@localhost:17010/api/campaign/create -d '{"name":"Hello", "segment":"123"}' {"campaign_id":"8901Z3VHXDTebEJWs"} $

That is everything - you have just integrated with Salesforce and exposed a REST channel for external applications to integrate with!

More resources

➤ Python API integration tutorial
What is an integration platform?
Python Integration platform as a Service (iPaaS)
What is an Enterprise Service Bus (ESB)? What is SOA?

More blog posts
Categories: FLOSS Project Planets

Quansight Labs Blog: Numpy QuadDType: Quadruple Precision for Everyone

Sun, 2024-09-29 20:00
Introducing the new data-type for Numpy providing cross-platform support of quadruple precision.
Categories: FLOSS Project Planets

Quansight Labs Blog: Polars Plugins: let's make them easier to use

Sun, 2024-09-29 20:00
Increasing ease-of-use of Polars plugins by improving an existing tutorial.
Categories: FLOSS Project Planets

Pages