Links related to tag python

What’s New In Python 3.11 ¶ - python
  • Some macros have been converted to static inline functions to avoid macro pitfalls{.reference .external}. The change should be mostly transparent to users, as the replacement functions will cast their arguments to the expected types to avoid compiler warnings due to static type checks. However, when the limited C API is set to >=3.11, these casts are not done, and callers will need to cast arguments to their expec...
jointakahe/takahe: An ActivityPub/Fediverse server - github

A beta Fediverse server for microblogging/"toots". Not fully functional yet - we're still working towards a 1.0!

Current version: 0.6.0

Key features:

  • Multiple domain support
  • Multiple identities per user (and can be shared between users)
  • Desktop, mobile and PWA-compatible web UI (with minimal JavaScript)
  • Mastodon-compatible client API (supports existing apps)
  • Easy deployment (web worker, backgro...
Sortie de Python 3.11 • Articles • Zeste de Savoir - zestedesavoir

Le rythme de publication des nouvelles versions de Python étant maintenant annuel, après Python 3.10 l'année dernière c'est donc ce lundi 24 octobre 2022 qu'est sortie la version 3.11 de Python.

Cette version apporte quelques nouveautés mais est surtout attendue pour le gain en performances de l'interpréteur. Voyons tout de suite plus en détails le contenu de cette version.

Cette version était p...

Documentation Brython - brython

 

module browser.ajax

Ce module permet d'exécuter des requêtes Ajax.

La syntaxe de l'API Web normalisée peut être utilisée (voir ci-dessous) mais Brython propose une syntaxe plus concise: pour chaque méthode de requête (GET, POST, etc.) le module définit une fonction spécifique.

Méthodes sans corps de données

get(url[, blo...

Datasette Lite: a server-side Python web application running in a browser - simonwillison

Datasette Lite: a server-side Python web application running in a browser

Datasette Lite is a new way to run Datasette: entirely in a browser, taking advantage of the incredible Pyodide project which provides Python compiled to WebAssembly plus a whole suite of useful extras.

You can try it out here:

https://lite.datasette.io/

The initial example loads two databases---the classic fixtures.db used ...

Boring Python: dependency management - b-list

Boring Python: dependency management

This is the first in hopefully a series of posts I intend to write about how to build/manage/deploy/etc. Python applications in as boring a way as possible. So before I go any further, I want to be absolutely clear on what I mean by "boring": I don't mean "reliable" or "bug-free" or "no incidents". ...

Build a URL Shortener With FastAPI and Python – Real Python - realpython

Build a URL Shortener With FastAPI and PythonReal Python

par Real Python, le mercredi 18 mai 2022 16:00

In this tutorial, you’ll build a URL shortener with Python and FastAPI. URLs can be extremely long and not user-friendly. This is where a URL shortener can come in handy. A URL shortener reduces the number of characters in a URL, making it easier to read, remember, and share.

By following this step-by-step project, you’ll build a URL shortener with Python and FastAPI. At the end of this tutorial, you’ll have a fully functional API-driven web app that creates shortened URLs that forward to target URLs.

In this tutorial, you’ll learn how to:

• Create a REST API with FastAPI

• Run a development web server with Uvicorn

• Model an SQLite database

• Investigate the auto-generated API documentation

• Interact with the database with CRUD actions

• Optimize your app by refactoring your code

This URL shortener project is for intermediate Python programmers who want to try out FastAPI and learn about API design, CRUD, and interaction with a database. To follow along, it’ll help if you’re familiar with the basics of handling HTTP requests. If you need a refresher on FastAPI, Using FastAPI to Build Python Web APIs is a great introduction.

Get Source Code: Click here to get access to the source code that you’ll use to build your Python URL shortener with FastAPI.

Demo: Your Python URL Shortener

In this step-by-step project, you’ll build an API to create and manage shortened URLs. The main purpose of this API is to receive a full target URL and return a shortened URL. To try out your API endpoints, you’ll leverage the documentation that FastAPI automatically creates:

When you post a target URL to the URL shortener app, you get a shortened URL and a secret key back. The shortened URL contains a random key that forwards to the target URL. You can use the secret key to see the shortened URL’s statistics or delete the forwarding.

Project Overview

Your URL shortener Python project will provide API endpoints that are capable of receiving different HTTP request types. Each endpoint will perform an action that you’ll specify. Here’s a summary of your URL shortener’s API endpoints:

/admin/{secret_key} DELETE Your secret key Deletes your shortened URL

The Call for Proposals for DjangoCon US 2022 Is Now Open! - djangoproject

The Call for Proposals for DjangoCon US 2022 Is Now Open!

The DjangoCon 2022 organizers are excited to announce that the first in-person DjangoCon since 2019 is now open for talk submissions: call for proposals{.reference .external}! The deadline for submissions is June 10th, 2022 AoE{.reference .external}. As long as it's still June 10th anywhere on earth, you can submit your proposal.

We invite you to submit your proposal no matter your ...