TypeSystem is a comprehensive data validation library that gives you:
- Data validation.
- Object serialization & deserialization.
- Form rendering.
- Marshaling validators to/from JSON schema.
- Tokenizing JSON or YAML to provide positional error messages.
- 100% type annotated codebase.
- 100% test coverage.
- Zero hard dependencies.
#python #html #serialization #validation #forms #deserialization
- Data validation.
- Object serialization & deserialization.
- Form rendering.
- Marshaling validators to/from JSON schema.
- Tokenizing JSON or YAML to provide positional error messages.
- 100% type annotated codebase.
- 100% test coverage.
- Zero hard dependencies.
#python #html #serialization #validation #forms #deserialization
๐ค3โค1๐คฏ1
This media is not supported in your browser
VIEW IN TELEGRAM
OpenBB Terminal is an awesome stock and crypto market terminal that has been developed for fun, while I saw my GME shares tanking.
#python #finance #terminal #cli #crypto #ml #stocks #investment
#python #finance #terminal #cli #crypto #ml #stocks #investment
๐5โค1๐1
Developing and Testing an Asynchronous API with FastAPI and Pytest.
This tutorial looks at how to develop and test an asynchronous API with FastAPI, Postgres, pytest and Docker using Test-driven Development (TDD). We'll also use the Databases package for interacting with Postgres asynchronously.
#python #article #asyncio #fastapi
This tutorial looks at how to develop and test an asynchronous API with FastAPI, Postgres, pytest and Docker using Test-driven Development (TDD). We'll also use the Databases package for interacting with Postgres asynchronously.
#python #article #asyncio #fastapi
๐ฅ2โค1๐1
Trio โ a friendly Python library for async concurrency and I/O.
The Trio project aims to produce a production-quality, permissively licensed, async/await-native I/O library for Python. Like all async libraries, its main purpose is to help you write programs that do multiple things at the same time with parallelized I/O. A web spider that wants to fetch lots of pages in parallel, a web server that needs to juggle lots of downloads and websocket connections simultaneously, a process supervisor monitoring multiple subprocesses... that sort of thing. Compared to other libraries, Trio attempts to distinguish itself with an obsessive focus on usability and correctness. Concurrency is complicated; we try to make it easy to get things right.
#python #async #event #loop #networking #io #trio #concurrency
The Trio project aims to produce a production-quality, permissively licensed, async/await-native I/O library for Python. Like all async libraries, its main purpose is to help you write programs that do multiple things at the same time with parallelized I/O. A web spider that wants to fetch lots of pages in parallel, a web server that needs to juggle lots of downloads and websocket connections simultaneously, a process supervisor monitoring multiple subprocesses... that sort of thing. Compared to other libraries, Trio attempts to distinguish itself with an obsessive focus on usability and correctness. Concurrency is complicated; we try to make it easy to get things right.
#python #async #event #loop #networking #io #trio #concurrency
๐ฅ3๐2โค1๐1๐1
TDengine is an open source, high-performance, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, and Industrial IoT. It enables efficient, real-time data ingestion, processing, and monitoring of TB and even PB scale data per day, generated by billions of sensors and data collectors. TDengine differentiates itself from other time-seires databases with the following advantages:
- High-Performance
- Simplified Solution
- Cloud Native
- Ease of Use
- Easy Data Analytics
- Open Source
#c #python #sql #database #monitoring #metrics #bigdata #scalability #distributed
- High-Performance
- Simplified Solution
- Cloud Native
- Ease of Use
- Easy Data Analytics
- Open Source
#c #python #sql #database #monitoring #metrics #bigdata #scalability #distributed
๐2๐ค2โค1
Memray is a memory profiler for Python. It can track memory allocations in Python code, in native extension modules, and in the Python interpreter itself. It can generate several different types of reports to help you analyze the captured memory usage data.
Notable features:
โข ๐ต๏ธโโ๏ธ Traces every function call so it can accurately represent the call stack, unlike sampling profilers.
โข โญ Also handles native calls in C/C++ libraries so the entire call stack is present in the results.
โข ๐ Blazing fast! Profiling slows the application only slightly. Tracking native code is somewhat slower, but this can be enabled or disabled on demand.
โข ๐ It can generate various reports about the collected memory usage data, like flame graphs.
โข ๐งต Works with Python threads.
โข ๐ฝ Works with native-threads (e.g. C++ threads in C extensions).
#python #profiler #memory #leak #detection
Notable features:
โข ๐ต๏ธโโ๏ธ Traces every function call so it can accurately represent the call stack, unlike sampling profilers.
โข โญ Also handles native calls in C/C++ libraries so the entire call stack is present in the results.
โข ๐ Blazing fast! Profiling slows the application only slightly. Tracking native code is somewhat slower, but this can be enabled or disabled on demand.
โข ๐ It can generate various reports about the collected memory usage data, like flame graphs.
โข ๐งต Works with Python threads.
โข ๐ฝ Works with native-threads (e.g. C++ threads in C extensions).
#python #profiler #memory #leak #detection
โค6๐ฅ2๐1
CustomTkinter is a python UI-library based on Tkinter, which provides new, modern and fully customizable widgets. They are created and used like normal Tkinter widgets and can also be used in combination with normal Tkinter elements. The widgets and the window colors either adapt to the system appearance or the manually set mode ('light', 'dark'), and all CustomTkinter widgets and windows support HighDPI scaling (Windows, macOS). With CustomTkinter you'll get a consistent and modern look across all desktop platforms.
#python #tkinter #gui #ui #macos #linux #windows
#python #tkinter #gui #ui #macos #linux #windows
๐5๐ฅ3โค2๐1
httpie is all the user-friendliness of our Terminal version, now wrapped up in a sleek graphical interface.
- Interact painlessly with APIs
- Organize your work in spaces, collections, and tabs
- Parametrize requests with variables and environments
- Work across devices with auto-save and realtime sync
- Build and preview requests without sending them
- Use the app offline and without an account
#http #client #python #desktop #cli #web #macos #windows #linux #rest #api
- Interact painlessly with APIs
- Organize your work in spaces, collections, and tabs
- Parametrize requests with variables and environments
- Work across devices with auto-save and realtime sync
- Build and preview requests without sending them
- Use the app offline and without an account
#http #client #python #desktop #cli #web #macos #windows #linux #rest #api
๐3โค1๐ฅ1๐1
Stable Diffusion is a latent text-to-image diffusion model. Thanks to a generous compute donation from Stability AI and support from LAION, we were able to train a Latent Diffusion Model on 512x512 images from a subset of the LAION-5B database. Similar to Google's Imagen, this model uses a frozen CLIP ViT-L/14 text encoder to condition the model on text prompts. With its 860M UNet and 123M text encoder, the model is relatively lightweight and runs on a GPU with at least 10GB VRAM. See this section below and the model card.
#python #ml #dl #text2image #diffusion #model #torch #torchvision
#python #ml #dl #text2image #diffusion #model #torch #torchvision
๐ฅ7โค1๐1
How async/await works in Python.
Code written in the async/await style looks like regular synchronous code but works very differently. To understand how it works, one should be familiar with many non-trivial concepts including concurrency, parallelism, event loops, I/O multiplexing, asynchrony, cooperative multitasking and coroutines. Python's implementation of async/await adds even more concepts to this list: generators, generator-based coroutines, native coroutines, yield and yield from. Because of this complexity, many Python programmers that use async/await do not realize how it actually works. I believe that it should not be the case. The async/await pattern can be explained in a simple manner if you start from the ground up. And that's what we're going to do today.
Author: Victor Skvortsov.
#article #python #async #await #concurrency #parallelism #event #io #multiplexing #multitasking
Code written in the async/await style looks like regular synchronous code but works very differently. To understand how it works, one should be familiar with many non-trivial concepts including concurrency, parallelism, event loops, I/O multiplexing, asynchrony, cooperative multitasking and coroutines. Python's implementation of async/await adds even more concepts to this list: generators, generator-based coroutines, native coroutines, yield and yield from. Because of this complexity, many Python programmers that use async/await do not realize how it actually works. I believe that it should not be the case. The async/await pattern can be explained in a simple manner if you start from the ground up. And that's what we're going to do today.
Author: Victor Skvortsov.
#article #python #async #await #concurrency #parallelism #event #io #multiplexing #multitasking
โค6๐4๐ฅ2๐1
Python Type Checking.
In this guide, you will get a look into Python type checking. Traditionally, types have been handled by the Python interpreter in a flexible but implicit way. Recent versions of Python allow you to specify explicit type hints that can be used by different tools to help you develop your code more efficiently.
#python #typing #mypy #realpython #guide #tutorial
In this guide, you will get a look into Python type checking. Traditionally, types have been handled by the Python interpreter in a flexible but implicit way. Recent versions of Python allow you to specify explicit type hints that can be used by different tools to help you develop your code more efficiently.
#python #typing #mypy #realpython #guide #tutorial
๐6๐2โค1
django-template โ a highly opinionated starter project which I use as a scaffold for all my Django projects.
I'm still working on this one, so work is in progress, but feel free to send PRs.
Features
-
-
-
-
-
-
-
-
-
-
#django #python #scaffold #template #bestpractices
I'm still working on this one, so work is in progress, but feel free to send PRs.
Features
-
Python 3.10, Django 4.1 and DRF 3.14.0-
poetry for managing dependencies-
postgres as a database-
redis as cache and message queue-
docker for development, testing, and production-
celery for asynchronous tasks-
black and isort for neat code formatting-
pytest and mimesis for testing-
django-debug-toolbar for debugging-
django-filter for easy filtering#django #python #scaffold #template #bestpractices
๐ฅ8๐3๐ฉ1๐1
OpenAI Cookbook.
This repository shares example code and example prompts for accomplishing common tasks with the OpenAI API.
To try these examples yourself, youโll need an OpenAI account. Create a free account to get started.
Most code examples are written in Python, though the concepts can be applied in any language.
In the same way that a cookbook's recipes don't span all possible meals or techniques, these examples don't span all possible use cases or methods. Use them as starting points upon which to elaborate, discover, and invent.
#python #openai #ai
This repository shares example code and example prompts for accomplishing common tasks with the OpenAI API.
To try these examples yourself, youโll need an OpenAI account. Create a free account to get started.
Most code examples are written in Python, though the concepts can be applied in any language.
In the same way that a cookbook's recipes don't span all possible meals or techniques, these examples don't span all possible use cases or methods. Use them as starting points upon which to elaborate, discover, and invent.
#python #openai #ai
๐5๐3๐ฅ1