Podcasts about sqlalchemy

  • 27PODCASTS
  • 53EPISODES
  • 53mAVG DURATION
  • ?INFREQUENT EPISODES
  • Mar 20, 2025LATEST

POPULARITY

20172018201920202021202220232024


Best podcasts about sqlalchemy

Latest podcast episodes about sqlalchemy

In Numbers We Trust - Der Data Science Podcast
#68: CI/CD für Daten: Datenversionierung für stabile & nachvollziehbare Systeme

In Numbers We Trust - Der Data Science Podcast

Play Episode Listen Later Mar 20, 2025 41:29


Daten(banken) versionieren – klingt maximal unsexy, spart aber Stress im Deployment. Warum ohne Schema-Versionierung selbst kleine Änderungen große Probleme verursachen und was ORMs, Flyway oder Liquibase damit zu tun haben, erfahrt ihr hier. Daten historisieren ist ein Must-have für Compliance, Reproduzierbarkeit und Modellierung. Aber Achtung: Nicht jede Lösung passt für jede Datenbank und den Live-Betrieb. Wir geben Tipps, wie ihr eure Datenprodukte systematisch und effizient im Griff behaltet. **Zusammenfassung** Schema-Versionierung ist essenziell, um Änderungen an Datenbanken nachvollziehbar und reibungslos ins Deployment einzubinden Fehlende Versionierung kann zu kaputten Prozessen führen, wenn Schema-Änderungen nicht dokumentiert und automatisiert umgesetzt werden Werkzeuge wie ORMs, Flyway oder Liquibase helfen dabei, Änderungen an Datenbankschemata strukturiert zu verwalten Historisierung von Daten ist für Compliance, Reproduzierbarkeit und Modellierung entscheidend   Ansätze zur Datenhistorisierung: Append-only-Strategien vs. System-Versionierung Herausforderungen: Performance-Engpässe, hohe Pflegekosten und Kompatibilitätsprobleme je nach Datenbank und Migrationstool   Best Practices: Versionierung systematisch einführen, Automatisierung priorisieren und sicherstellen, dass Downgrades funktionieren.   **Links** #58: Arm, aber sexy: Data Warehousing at Scale ohne Budget https://www.podbean.com/ew/pb-gywt4-1719aef #52: In-process Datenbanken und das Ende von Big Data https://www.podbean.com/ew/pb-tekgi-16896e4 #36: Der Data Mesh Hype und was davon bleibt https://www.podbean.com/ew/pb-7er7v-15080c1 Flyway: https://www.red-gate.com/products/flyway/ Liquibase: https://www.liquibase.com/ Alembic (für SQLAlchemy): https://alembic.sqlalchemy.org/en/latest/ MariaDB: https://mariadb.org/ ClickHouse: https://clickhouse.com/ Fragen, Feedback und Themenwünsche gern an podcast@inwt-statistics.de

Moscow Python: подкаст о Python на русском
Python Day Special с Иваном Кривошеевым

Moscow Python: подкаст о Python на русском

Play Episode Listen Later May 18, 2024 58:41


Спонсор подкаста — https://learn.python.ru Python Day на Positive Hack Days — https://bit.ly/phd-mpp  Это второй специальный выпуск подкаста – Python Special Day. Поговорили с Иваном Кривошеевым, ведущим разработчиком Positive Technologies: про sendbox в Positive Technologies о чём будет доклад на Positive Hack Days опыт переписывания на Rust впечатления от mypy Object-relational mapping (ORM) чего не хватает в SQLAlchemy асинхронные фреймворки о GIL  Ссылки выпуска: Курс Learn Python — https://learn.python.ru/ Канал Миши в Telegram — https://t.me/tricky_python Канал Moscow Python в Telegram — https://t.me/moscow_python Все выпуски — https://podcast.python.ru Митапы Moscow Python — https://moscowpython.ru 

Python Podcast
GUI-Applikationen am Beispiel von MiaPlan

Python Podcast

Play Episode Listen Later May 4, 2023


Python Bytes
#325 It's called a merge conflict

Python Bytes

Play Episode Listen Later Feb 28, 2023 39:32


Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Michael #1: Python Parquet and Arrow: Using PyArrow With Pandas Parquet is an efficient, compressed, column-oriented storage format for arrays and tables of data. Less wrangle-able than Pandas, but way faster and lower memory Questions answered Can we use Pandas DataFrames and Arrow tables together, and if so, how is this done? (It turns out the answer is yes, and it's quite simple, as we'll see). In what ways are Arrow tables “better” than Pandas DataFrames? In other words, for which tasks are Arrow tables better suited? Conversely, what tasks are possible or easy in Pandas that are difficult or impossible in Arrow? As an on-disk format, how does Parquet compare to popular alternatives such as feather, orc, CSV, etc.? Brian #2: FastAPI-Filter Arthur Rio Add query string filters to your api endpoints and show them in the swagger UI. The supported backends are SQLAlchemy and MongoEngine. FastAPI-Filter documentation The philosophy of fastapi_filter is to be very declarative. You define the fields you want to be able to filter on as well as the type of operator, then tie your filter to a specific model. default filters: neq, gt, gte, in, isnull, lt, lte, not/ne, not_in, nin, like/ilike The swagger support is actually quite cool. Michael #3: 12 Python Decorators to Take Your Code to the Next Level Decorators are awesome This is mostly home-grown decorators, but some standard ones too Notable ones: @warps @lru_cache @repeat @timeit @retry ← no please use tenacity @countcall @rate_limited @dataclass @register @property @singledispatch Brian #4: PyHamcrest Contributed by Txels PyHamcrest is a framework for writing matcher objects, allowing you to declaratively define “match” rules. PyHamcrest tutorial Having a tool that allows you to pick out precisely the aspect under test and describe the values it should have, to a controlled level of precision, helps greatly in writing tests that are “just right.” From Brian: I've been reluctant to try matcher style assertion helper libraries, as, with pytest, assert works just fine. However, I can see cases where PyHamcrest assertions could help test readability, and that's always a win. Examples: equality: assert_that(theBiscuit, equal_to(myBiscuit)) exceptions: assert_that(calling(parse, bad_data), raises(ValueError)) async: assert_that(``**await** resolved(future), future_raising(ValueError)) boolean: assert_that(theBiscuit.isCooked()) There's predefined matchers for objects, numbers, text, logical checks, dequences, dictionaries Extras Brian: pytest tips and tricks - recent post, and discussion on upcoming Talk Python episode sharing pytest fixtures - placeholder page where I'll share slides and code after my talk. Michael: Python runtime updates Django 4.2 beta 1 released Joke: A group of developers is called …

DevZen Podcast
Алхимики трут за спектр — Episode 414

DevZen Podcast

Play Episode Listen Later Feb 22, 2023 140:18


В этом выпуске: глубинное погружение в SQLAlchemy, сколько человек слушают нас несмотря на возрастное ограничение, компиляция запросов в СУБД, обсуждаем один из первых персональных компьютеров ZX Spectrum и его клоны, а также темы наших слушателей. Шоуноты: [00:04:33] Чему мы научились за неделю Migrate from Apple Notes | FAQ & Support | Bear App html2text —… Читать далее →

Python Bytes
#322 Python Packages, Let Me Count The Ways

Python Bytes

Play Episode Listen Later Feb 7, 2023 46:40


Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Special guest: @calvinhp@fosstodon.org Join us on YouTube at pythonbytes.fm/stream/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Brian #1: Packaging Python Projects Tutorial from PyPA This is a really good starting point to understand how to share Python code through packaging. Includes discussion of directory layout creating package files, LICENSE, pyproject.toml, README.md, tests and src dir how to fill out build-system section of pyproject.toml using either hatchling, setuptools, flit, or pdm as backends metadata using build to generate wheels and tarballs uploading with twine However For small-ish pure Python projects, I still prefer flit flit init creates pyproject.toml and LICENSE will probably still need to hand tweak pyproject.toml flit build replaces build flit publish replaces twine The process can be confusing, even for seasoned professionals. Further discussion later in the show Michael #2: untangle xml Convert XML to Python objects Children can be accessed with parent.child, attributes with element['attribute']. Call the parse() method with a filename, an URL or an XML string. Given this XML: [HTML_REMOVED] [HTML_REMOVED] [HTML_REMOVED] [HTML_REMOVED] Access the document: obj.root.child['name'] # u'child1' A little cleaner that ElementTree perhaps. Calvin #3: Mypy 1.0 Released Mypy is a static type checker for Python, basically a Python linter on steroids Started in 2012 and developed by a team at Dropbox lead by https://github.com/JukkaL What's New? New Release Numbering Scheme not using symver Significant backward incompatible changes will be announced in the blog post for the previous feature release feature flags will allow users to upgrade and turn on the new behavior Mypy 1.0 is 40% faster than 0.991 against the Dropbox internal codebase 20 optimizations included in this release Mypy now warns about errors used before definition or possibly undefined variables for example if a variable is used outside of a block of code that may not execute Mypy now supports the new Self type introduced in PEP 673 and Python 3.11 Support ParamSpec in Type Aliases Also, ParamSpec and Generic Self types are no loner experimental Lots of Miscellaneous New Features Fixes to crashes Support for compiling Python match statements introduced in Python 3.10 Brian #4: Thoughts on the Python packaging ecosystem Pradyun Gedam Some great background on the internal tension around packaging. Brian's note: in the meantime people are struggling to share Python code the “best practice” answer seems to shift regularly this might be healthy to arrive at better tooling in the long term, but in the short term, it's hurting us. From the article: The Python packaging ecosystem unintentionally became the type of competitive space that it is today. The community needs to make an explicit decision if it should continue operating under the model that led to status quo. Pick from N different tools that do N different things is a good model. Pick from N ~equivalent choices is a really bad user experience. Picking a default doesn't make other approaches illegal. Communication about the Python packaging ecosystem is fragmented, and we should improve that. Pradyun: “Many of the users who write Python code are not primarily full-time software engineers or “developers”.” from Thea: “The reason there are so many tools for managing Python dependencies is because Python is not a monoculture and different folks need different things.” opening up the build backend through pyproject.toml-based builds was good but the fracturing of multiple “workflow” tools seems bad. “I am certain that it is not possible to create a single “workflow” tool for Python software. What we have today, an ecosystem of tooling where each makes different design choices and technical trade-offs, is a part of why Python is as widespread as it is today. This flexibility and availability of choice is, however, both a blessing and a curse.” On building a default workflow tool around pip interesting idea There's tension between “we need a default workflow tool” and “unix philosophy: many focused tools that can work together”. Michael #5: Top PyPI Packages A monthly dump of the 5,000 most-downloaded packages from PyPI. Also, a full copy of PyPI info too: github.com/orf/pypi-data Calvin #6: SQLAlchemy 2.0 Released #57 on the Top PyPI Packages

Moscow Python: подкаст о Python на русском
Выход SQLAlchemy 2.0 / сборка Python без GIL / топ Python библиотек 2022 и другие новости Python

Moscow Python: подкаст о Python на русском

Play Episode Listen Later Feb 3, 2023 50:50


Новый выпуск посвятили актуальным новостям за январь 2023 года в мире Python. Ниже оставили ссылки на все материалы этого подкаста.   фреймворк Robin - https://github.com/sansyrox/robyn PEP 703 по Python без GIL - https://peps.python.org/pep-0703/ релиз SQLAlchemy 2.0 - https://www.sqlalchemy.org/ PEP 701 по доработке f-строк - https://peps.python.org/pep-0701/ PEP 704 по обязательному виртуальному окружению - https://peps.python.org/pep-0704/ Malware в nightly-билдах - https://pytorch.org/blog/compromised-... Python 2.7 убрали из Debidian - https://bugs.debian.org/cgi-bin/bugre... топ Python библиотек 2022 - https://tryolabs.com/blog/2022/12/26/...   Ведущие: Михаил Корнеев и Илья Лебедев   Все выпуски: https://podcast.python.ru Митапы MoscowPython: https://moscowpython.ru Курс Learn Python: https://learn.python.ru/

Der Data Analytics Podcast
Python-Packages und Librarys für Data Engineering

Der Data Analytics Podcast

Play Episode Listen Later Jan 23, 2023 5:37


https://larsmuellensiefen.substack.com/ - Data Engineering ist ein wichtiger Bestandteil des Prozesses der Datenverarbeitung, der sich mit der Gewinnung, Vorbereitung, Verarbeitung und Verwaltung von Daten beschäftigt. Es gibt viele Python-Pakete, die für die Unterstützung von Data-Aufgaben entwickelt wurden und die es ermöglichen, Daten effektiv zu verarbeiten und zu analysieren. Einige dieser wichtigen Pakete sind Pandas, NumPy, Scikit-learn, TensorFlow, PySpark, Airflow, Dask und SQLAlchemy.

The Real Python Podcast
Building Python REST APIs With Flask & Structuring Pull Requests

The Real Python Podcast

Play Episode Listen Later Nov 25, 2022 57:33


How do you build a REST API using the Flask web framework? How can you quickly add endpoints while automatically generating documentation? This week on the show, Real Python author Philipp Acsany is here to discuss his tutorial series "Python REST APIs With Flask, Connexion, and SQLAlchemy." Christopher Trudeau is also here with another batch of PyCoder's Weekly articles and projects.

Python Bytes
#297 I AM the documentation

Python Bytes

Play Episode Listen Later Aug 16, 2022 22:36


Watch the live stream: Watch on YouTube About the show Sponsored by the IRL Podcast from Mozilla Michael #1: SQLCodeGen via Josh Thurston This is a tool that reads the structure of an existing database and generates the appropriate SQLAlchemy model code, using the declarative style if possible. This tool was written as a replacement for sqlautocode, which was suffering from several issues (including, but not limited to, incompatibility with Python 3 and the latest SQLAlchemy version). Features: Supports SQLAlchemy 1.4.x Produces declarative code that almost looks like it was hand written Produces PEP 8 compliant code Accurately determines relationships, including many-to-many, one-to-one Automatically detects joined table inheritance Excellent test coverage Brian #2: The death of setup.py*, long live pyproject.toml for Python-only projects Juan Luis Cano Rodriguez tweet pip install --``editable . now works with setuptools, as of version 64.0.0 To be clear, setup.cfg also not required. So everything can be in pyproject.toml The * part: projects with non-Python bits may still need setup.py See also the newly updated tutorial by the PyPA: Packaging Python Projects Now with absolutely no mention of setup.py or setup.cfg It's all pyproject.toml Commentary: For Python only projects, is setuptools a decent flit contender??? stay tuned Michael #3: aiocache via Owen Lamont In the same vein as async-cache you might also be interested in aiocache. It has some cool functionality like an optional Redis backend for multi process caching. his library aims for simplicity over specialization. All caches contain the same minimum interface which consists on the following functions: add: Only adds key/value if key does not exist. get: Retrieve value identified by key. set: Sets key/value. multi_get: Retrieves multiple key/values. multi_set: Sets multiple key/values. exists: Returns True if key exists False otherwise. increment: Increment the value stored in the given key. delete: Deletes key and returns number of deleted items. clear: Clears the items stored. raw: Executes the specified command using the underlying client. Brian #4: Hatch : a modern, extensible Python project manager Another flit contender? While reading Packaging Python Projects tutorial update, I noticed some examples for hatchling, as an alternative to setuptools, flit-core, and pdm. Played with it some, but still have some exploring to do. features Standardized build system with reproducible builds by default Robust environment management with support for custom scripts Easy publishing to PyPI or other sources includes --repo flag to be able to publish to alternative indices. Awesome for internal systems. Version management Configurable project generation with sane defaults Responsive CLI, ~2-3x faster than equivalent tools This sounds great. I haven't verified this Commentary: Good to see more packaging tools and user workflow explorations around packaging. Extras Michael: M1 Support for PyPy Announced (via PyCoders) Joke: I am the docs

Python Bytes
#292 Thursday, it's always a Thursday

Python Bytes

Play Episode Listen Later Jul 11, 2022 28:36


Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Brian #1: rich-codex by Phil Ewels suggested by Will McGugan “A GitHub Action / command-line tool which generates screen grab images of a terminal window, containing command outputs or code snippets.” Generate images from commands embedded in markdown files, like README.md, for example. Searches through markdown files for stuff like: ![cat cat.txt | lolcat -S 1](img/cat.svg) then runs the command, and generates the image. Can be done within a GitHub action Can also send code snippets or json to rich-cli, then generate an image. You can also have commands in a config file, Very easy to use, makes very professional looking images for documentation, that's always up to date. Michael #2: Pydastic via Roman Right, by Rami Awar Pydastic is an elasticsearch python ORM based on Pydantic. Core Features Simple CRUD operations supported Sessions for simplifying bulk operations (a la SQLAlchemy) Dynamic index support when committing operations More on Elasticsearch here Brian #3: 3 Things to Know Before Building with PyScript by Braden Riggs Package indentation matters Local file access is possible. [HTML_REMOVED] - numpy - pandas - paths: - /views.csv [HTML_REMOVED] DOM manipulation has interesting conventions For buttons, you can include pys-onClick=”your_function” parameter to trigger python functions when clicked. For retrieving user input from within the [HTML_REMOVED] tag document.getElementById(‘input_obj_id').value can retrieve the input value. And Finally pyscript.write(“output_obj_id”, data) can write output to a tag from within the [HTML_REMOVED] tag. Michael's Pyscript videos Python + pyscript + WebAssembly: Python Web Apps, Running Locally with pyscript Python iOS Web App with pyscript and offline PWAs Michael #4: disnake via Sean Koenig disnake is a modern, easy to use, feature-rich, and async-ready API wrapper for Discord. Features: Modern Pythonic API using async/await syntax Sane rate limit handling that prevents 429 errors Command extension to aid with bot creation Easy to use with an object oriented design Optimized for both speed and memory Quickstart Commands API Extras Michael: Scholarships for upcoming FastAPI + MongoDB live course Humble Bundle for Python 2022 Michael's crazy earbuds (UE Fits) Joke: Better than a wage increase

Python Bytes
#275 Airspeed velocity of an unladen astropy

Python Bytes

Play Episode Listen Later Mar 16, 2022 42:43


Watch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Special guest: Emily Morehouse-Valcarcel Michael #1: Async and await with subprocesses by Fredrik Averpil People know I do all sorts of stuff with async Lots of cool async things are not necessarily built into Python, but our instead third-party packages E.g. files via aiofiles But asyncio has asyncio.create_subprocess_exec Fredrik's article has some nice examples I started using this for mp3 uploads and behind the scenes processing for us Brian #2: Typesplainer Arian Mollik Wasi, @wasi_master Suggested by Will McGugan Now released a vscode extension for that! Available on vscode as typesplainer Emily #3: Ibis Project via Marlene Mhangami “Productivity-centric Python data analysis framework for SQL engines and Hadoop” focused on: Type safety Expressiveness Composability Familiarity Marlene wrote an excellent blog post as an introduction Works with tons of different backends, either directly or via compilation Depending on the backend, it actually uses SQLAlchemy under the hood There's a ton of options for interacting with a SQL database from Python, but Ibis has some interesting features geared towards performance and analyzing large sets of data. It's a great tool for simple projects, but an excellent tool for anything data science related since it plays so nicely with things like pandas Michael #4: ASV via Will McGugan AirSpeed Velocity (asv) is a tool for benchmarking Python packages over their lifetime. Runtime, memory consumption and even custom-computed values may be tracked. See quickstart Example of astropy here. Finding a commit that produces a large regression Brian #5: perflint Anthony Shaw pylint extension for performance anti patterns curious why a pylint extension and not a flake8 plugin. I think the normal advice of “beware premature optimization” is good advice. But also, having a linter show you some code habits you may have that just slow things down is a nice learning tool. Many of these items are also not going to be the big show stopper performance problems, but they add unnecessary performance hits. To use this, you also have to use pylint, and that can be a bit painful to start up with, as it's pretty picky. Tried it on a tutorial project today, and it complained about any variable, or parameter under 3 characters. Seems a bit picky to me for tutorials, but probably good advice for production code. These are all configurable though, so you can dial back the strictness if necessary. perflint checks: W8101 : Unnessecary list() on already iterable type W8102: Incorrect iterator method for dictionary W8201: Loop invariant statement (loop-invariant-statement) ←- very cool W8202: Global name usage in a loop (loop-invariant-global-usage) R8203 : Try..except blocks have a significant overhead. Avoid using them inside a loop (loop-try-except-usage). W8204 : Looped slicing of bytes objects is inefficient. Use a memoryview() instead (memoryview-over-bytes) W8205 : Importing the "%s" name directly is more efficient in this loop. (dotted-import-in-loop) Emily #6: PEP 594 Acceptance “Removing dead batteries from the standard library” Written by Christian Heimes and Brett Cannon back in 2019, though the conversation goes back further than that It's a very thin line for modules that might still be useful to someone versus the development effort needed to maintain them. Recently accepted, targeting Python 3.11 (final release planned for October 2022, development begins in May 2021. See the full release schedule) Deprecations will begin in 3.11 and modules won't be fully removed until 3.13 (~October 2024) See the full list of deprecated modules Bonus: new PEP site and theme! Extras Brian: Michael: Emily: Riff off of one of Brian's topics from last week: Automate your interactive rebases with fixups and auto-squashing Cool award that The PSF just received PSF Spring Fundraiser Cuttlesoft is hiring! Jokes: *Changing * (via Ruslan) Please hire me

Python Bytes
#270 Can errors really be beautiful?

Python Bytes

Play Episode Listen Later Feb 10, 2022 47:25


Watch the live stream: Watch on YouTube About the show Sponsored by Datadog: pythonbytes.fm/datadog Special guest: Dean Langsam Brian #1: A Better Pygame Mainloop Glyph Doing some game programming is a great way to work on coding for early devs (and experienced devs). pygame is a popular package for writing games in Python But… the normal example of a main loop, which listens for events and dispatches actions based on events, has some problems: it's got a while 1: that wastes power, too much busy waiting looks bad, due to “screen tearing” which is writing to a screen while your in the middle of drawing it This post discusses the problems, and walks through to an async main loop that creates a better gaming experience. Michael #2: awesome sqlalchemy A few notable ones SQLAlchemy-Continuum: Versioning and auditing extension for SQLAlchemy. SQLAlchemy-Utc: SQLAlchemy type to store aware datetime.datetime values. SQLAlchemy-Utils: Various utility functions, new data types and helpers for SQLAlchemy filedepot: DEPOT is a framework for easily storing and serving files in web applications. SQLAlchemy-ImageAttach: SQLAlchemy-ImageAttach is a SQLAlchemy extension for attaching images to entity objects. SQLAlchemy-Searchable: Full-text searchable models for SQLAlchemy. sqlalchemy_schemadisplay: This module generates images from SQLAlchemy models. Can we also get a shoutout to SQLModel? Dean #3: ThreadPoolExecutor in Python: The Complete Guide Long, but worth it (80-120 minutes). Could be consumed in parts. It's mostly a collection of other blogposts on superfastpython Many examples LifeCycle Usage patterns Map and was as_completed vs sequentially callbacks IO-Bound vs CPU-bound Common Questions Comparison vs. ProcessPoolExecutor vs. threading.Thread vs. AsyncIO Brian #4: Chaining comparison operators Rodrigo Girão Serrão I use chained expressions all the time, mostly with ranges: min

Melbourne AWS User Group
What's New in November and at re:Invent 2021

Melbourne AWS User Group

Play Episode Listen Later Jan 26, 2022 97:15


Pull your podcast player out of instant retrieval, because we're discussing re:Invent 2021 as well as the weeks before it. Lots of announcements; big, small, weird, awesome, and anything in between. We had fun with this episode and hope you do too. Find us at melb.awsug.org.au or as @AWSMelb on Twitter. News Finally in Sydney AWS Snowcone SSD is now available in the US East (Ohio), US West (San Francisco), Asia Pacific (Singapore), Asia Pacific (Sydney) and AWS Asia Pacific (Tokyo) regions Amazon EC2 M6i instances are now available in 5 additional regions Serverless Introducing Amazon EMR Serverless in preview Announcing Amazon Kinesis Data Streams On-Demand Announcing Amazon Redshift Serverless (Preview) Introducing Amazon MSK Serverless in public preview Introducing Amazon SageMaker Serverless Inference (preview) Simplify CI/CD Configuration for AWS Serverless Applications and your favorite CI/CD system – General Availability Amazon AppStream 2.0 launches Elastic fleets, a serverless fleet type AWS Chatbot now supports management of AWS resources in Slack (Preview) Lambda AWS Lambda now supports partial batch response for SQS as an event source AWS Lambda now supports cross-account container image pulling from Amazon Elastic Container Registry AWS Lambda now supports mTLS Authentication for Amazon MSK as an event source AWS Lambda now logs Hyperplane Elastic Network Interface (ENI) ID in AWS CloudTrail data events Step Functions AWS Step Functions Synchronous Express Workflows now supports AWS PrivateLink Amplify Introducing AWS Amplify Studio AWS Amplify announces the ability to override Amplify-generated resources using CDK AWS Amplify announces the ability to add custom AWS resources to Amplify-created backends using CDK and CloudFormation AWS Amplify UI launches new Authenticator component for React, Angular, and Vue AWS Amplify announces the ability to export Amplify backends as CDK stacks to integrate into CDK-based pipelines AWS Amplify expands its Notifications category to include in-app messaging (Developer Preview) AWS Amplify announces a redesigned, more extensible GraphQL Transformer for creating app backends quickly Containers Fargate Announcing AWS Fargate for Amazon ECS Powered by AWS Graviton2 Processors ECS Amazon ECS now adds container instance health information Amazon ECS has improved Capacity Providers to deliver faster Cluster Auto Scaling Amazon ECS-optimized AMI is now available as an open-source project Amazon ECS announces a new integration with AWS Distro for OpenTelemetry EKS Amazon EKS on AWS Fargate now Supports the Fluent Bit Kubernetes Filter Amazon EKS adds support for additional cluster configuration options using AWS CloudFormation Visualize all your Kubernetes clusters in one place with Amazon EKS Connector, now generally available AWS Karpenter v0.5 Now Generally Available AWS customers can now find, subscribe to, and deploy third-party applications that run in any Kubernetes environment from AWS Marketplace Other Amazon ECR announces pull through cache repositories AWS App Mesh now supports ARM64-based Envoy Images EC2 & VPC Instances New – EC2 Instances (G5) with NVIDIA A10G Tensor Core GPUs | AWS News Blog Announcing new Amazon EC2 G5g instances powered by AWS Graviton2 processors Introducing Amazon EC2 R6i instances Introducing two new Amazon EC2 bare metal instances Amazon EC2 Mac Instances now support hot attach and detach of EBS volumes Amazon EC2 Mac Instances now support macOS Monterey Announcing Amazon EC2 M1 Mac instances for macOS Announcing preview of Amazon Linux 2022 Elastic Beanstalk supports AWS Graviton-based Amazon EC2 instance types Announcing preview of Amazon EC2 Trn1 instances Announcing new Amazon EC2 C7g instances powered by AWS Graviton3 processors Announcing new Amazon EC2 Im4gn and Is4gen instances powered by AWS Graviton2 processors Introducing the AWS Graviton Ready Program Introducing Amazon EC2 M6a instances AWS Compute Optimizer now offers enhanced infrastructure metrics, a new feature for EC2 recommendations AWS Compute Optimizer now offers resource efficiency metrics Networking AWS price reduction for data transfers out to the internet Amazon Virtual Private Cloud (VPC) customers can now create IPv6-only subnets and EC2 instances Application Load Balancer and Network Load Balancer end-to-end IPv6 support AWS Transit Gateway introduces intra-region peering for simplified cloud operations and network connectivity Amazon Virtual Private Cloud (VPC) announces IP Address Manager (IPAM) to help simplify IP address management on AWS Amazon Virtual Private Cloud (VPC) announces Network Access Analyzer to help you easily identify unintended network access Introducing AWS Cloud WAN Preview Introducing AWS Direct Connect SiteLink Other Recover from accidental deletions of your snapshots using Recycle Bin Amazon EBS Snapshots introduces a new tier, Amazon EBS Snapshots Archive, to reduce the cost of long-term retention of EBS Snapshots by up to 75% Amazon CloudFront now supports configurable CORS, security, and custom HTTP response headers Amazon EC2 now supports access to Red Hat Knowledgebase Amazon EC2 Fleet and Spot Fleet now support automatic instance termination with Capacity Rebalancing AWS announces a new capability to switch license types for Windows Server and SQL Server applications on Amazon EC2 AWS Batch introduces fair-share scheduling Amazon EC2 Auto Scaling Now Supports Predictive Scaling with Custom Metrics Dev & Ops New services Measure and Improve Your Application Resilience with AWS Resilience Hub | AWS News Blog Scalable, Cost-Effective Disaster Recovery in the Cloud | AWS News Blog Announcing general availability of AWS Elastic Disaster Recovery AWS announces the launch of AWS AppConfig Feature Flags in preview Announcing Amazon DevOps Guru for RDS, an ML-powered capability that automatically detects and diagnoses performance and operational issues within Amazon Aurora Introducing Amazon CloudWatch Metrics Insights (Preview) Introducing Amazon CloudWatch RUM for monitoring applications' client-side performance IaC AWS announces Construct Hub general availability AWS Cloud Development Kit (AWS CDK) v2 is now generally available You can now import your AWS CloudFormation stacks into a CloudFormation stack set You can now submit multiple operations for simultaneous execution with AWS CloudFormation StackSets AWS CDK releases v1.126.0 - v1.130.0 with high-level APIs for AWS App Runner and hotswap support for Amazon ECS and AWS Step Functions SDKs AWS SDK for Swift (Developer Preview) AWS SDK for Kotlin (Developer Preview) AWS SDK for Rust (Developer Preview) CICD AWS Proton now supports Terraform Open Source for infrastructure provisioning AWS Proton introduces Git management of infrastructure as code templates AWS App2Container now supports Jenkins for setting up a CI/CD pipeline Other Amazon CodeGuru Reviewer now detects hardcoded secrets in Java and Python repositories EC2 Image Builder enables sharing Amazon Machine Images (AMIs) with AWS Organizations and Organization Units Amazon Corretto 17 Support Roadmap Announced Amazon DevOps Guru now Supports Multi-Account Insight Aggregation with AWS Organizations AWS Toolkits for Cloud9, JetBrains and VS Code now support interaction with over 200 new resource types AWS Fault Injection Simulator now supports Amazon CloudWatch Alarms and AWS Systems Manager Automation Runbooks. AWS Device Farm announces support for testing web applications hosted in an Amazon VPC Amazon CloudWatch now supports anomaly detection on metric math expressions Introducing Amazon CloudWatch Evidently for feature experimentation and safer launches New – Amazon CloudWatch Evidently – Experiments and Feature Management | AWS News Blog Introducing AWS Microservice Extractor for .NET Security AWS Secrets Manager increases secrets limit to 500K per account AWS CloudTrail announces ErrorRate Insights AWS announces the new Amazon Inspector for continual vulnerability management Amazon SQS Announces Server-Side Encryption with Amazon SQS-managed encryption keys (SSE-SQS) AWS WAF adds support for Captcha AWS Shield Advanced introduces automatic application-layer DDoS mitigation Security Hub AWS Security Hub adds support for AWS PrivateLink for private access to Security Hub APIs AWS Security Hub adds three new FSBP controls and three new partners SSO Manage Access Centrally for CyberArk Users with AWS Single Sign-On Manage Access Centrally for JumpCloud Users with AWS Single Sign-On AWS Single Sign-On now provides one-click login to Amazon EC2 instances running Microsoft Windows AWS Single Sign-On is now in scope for AWS SOC reporting Control Tower AWS Control Tower now supports concurrent operations for detective guardrails AWS Control Tower now supports nested organizational units AWS Control Tower now provides controls to meet data residency requirements Deny services and operations for AWS Regions of your choice with AWS Control Tower AWS Control Tower introduces Terraform account provisioning and customization Data Storage & Processing Databases Relational databases Announcing Amazon RDS Custom for SQL Server New Multi-AZ deployment option for Amazon RDS for PostgreSQL and for MySQL; increased read capacity, lower and more consistent write transaction latency, and shorter failover time (Preview) Amazon RDS now supports cross account KMS keys for exporting RDS Snapshots Amazon Aurora supports MySQL 8.0 Amazon RDS on AWS Outposts now supports backups on AWS Outposts Athena Amazon Athena adds cost details to query execution plans Amazon Athena announces cross-account federated query New and improved Amazon Athena console is now generally available Amazon Athena now supports new Lake Formation fine-grained security and reliable table features Announcing Amazon Athena ACID transactions, powered by Apache Iceberg (Preview) Redshift Announcing preview for write queries with Amazon Redshift Concurrency Scaling Amazon Redshift announces native support for SQLAlchemy and Apache Airflow open-source frameworks Amazon Redshift simplifies the use of other AWS services by introducing the default IAM role Announcing Amazon Redshift cross-region data sharing (preview) Announcing preview of SQL Notebooks support in Amazon Redshift Query Editor V2 Neptune Announcing AWS Graviton2-based instances for Amazon Neptune AWS releases open source JDBC driver to connect to Amazon Neptune MemoryDB Amazon MemoryDB for Redis now supports AWS Graviton2-based T4g instances and a 2-month Free Trial Database Migration Service AWS Database Migration Service now supports parallel load for partitioned data to S3 AWS Database Migration Service now supports Kafka multi-topic AWS Database Migration Service now supports Azure SQL Managed Instance as a source AWS Database Migration Service now supports Google Cloud SQL for MySQL as a source Introducing AWS DMS Fleet Advisor for automated discovery and analysis of database and analytics workloads (Preview) AWS Database Migration Service now offers a new console experience, AWS DMS Studio AWS Database Migration Service now supports Time Travel, an improved logging mechanism Other Database Activity Streams now supports Graviton2-based instances Amazon Timestream now offers faster and more cost-effective time series data processing through scheduled queries, multi-measure records, and magnetic storage writes Amazon DynamoDB announces the new Amazon DynamoDB Standard-Infrequent Access table class, which helps you reduce your DynamoDB costs by up to 60 percent Achieve up to 30% better performance with Amazon DocumentDB (with MongoDB compatibility) using new Graviton2 instances S3 Amazon S3 on Outposts now delivers strong consistency automatically for all applications Amazon S3 Lifecycle further optimizes storage cost savings with new actions and filters Announcing the new Amazon S3 Glacier Instant Retrieval storage class - the lowest cost archive storage with milliseconds retrieval Amazon S3 Object Ownership can now disable access control lists to simplify access management for data in S3 Amazon S3 Glacier storage class is now Amazon S3 Glacier Flexible Retrieval; storage price reduced by 10% and bulk retrievals are now free Announcing the new S3 Intelligent-Tiering Archive Instant Access tier - Automatically save up to 68% on storage costs Amazon S3 Event Notifications with Amazon EventBridge help you build advanced serverless applications faster Amazon S3 console now reports security warnings, errors, and suggestions from IAM Access Analyzer as you author your S3 policies Amazon S3 adds new S3 Event Notifications for S3 Lifecycle, S3 Intelligent-Tiering, object tags, and object access control lists Glue AWS Glue DataBrew announces native console integration with Amazon AppFlow AWS Glue DataBrew now supports custom SQL statements to retrieve data from Amazon Redshift and Snowflake AWS Glue DataBrew now allows customers to create data quality rules to define and validate their business requirements FSx Introducing Amazon FSx for OpenZFS Amazon FSx for Lustre now supports linking multiple Amazon S3 buckets to a file system Amazon FSx for Lustre can now automatically update file system contents as data is deleted and moved in Amazon S3 Announcing the next generation of Amazon FSx for Lustre file systems Backup Announcing preview of AWS Backup for Amazon S3 AWS Backup adds support for Amazon Neptune AWS Backup adds support for Amazon DocumentDB (with MongoDB compatibility) AWS Backup provides new resource assignment rules for your data protection policies AWS Backup adds support for VMware workloads Other AWS Lake Formation now supports AWS PrivateLink AWS Transfer Family adds identity provider options and enhanced monitoring capabilities Introducing ability to connect to EMR clusters in different subnets in EMR Studio AWS Snow Family now supports external NTP server configuration Announcing data tiering for Amazon ElastiCache for Redis Now execute python files and notebooks from another notebook in EMR Studio AWS Snow Family launches offline tape data migration capability AI & ML SageMaker Introducing Amazon SageMaker Canvas - a visual, no-code interface to build accurate machine learning models Announcing Fully Managed RStudio on Amazon SageMaker for Data Scientists | AWS News Blog Amazon SageMaker now supports inference testing with custom domains and headers from SageMaker Studio Amazon SageMaker Pipelines now supports retry policies and resume Announcing new deployment guardrails for Amazon SageMaker Inference endpoints Amazon announces new NVIDIA Triton Inference Server on Amazon SageMaker Amazon SageMaker Pipelines now integrates with SageMaker Model Monitor and SageMaker Clarify Amazon SageMaker now supports cross-account lineage tracking and multi-hop lineage querying Introducing Amazon SageMaker Inference Recommender Introducing Amazon SageMaker Ground Truth Plus: Create high-quality training datasets without having to build labeling applications or manage the labeling workforce on your own Amazon SageMaker Studio Lab (currently in preview), a free, no-configuration ML service Amazon SageMaker Studio now enables interactive data preparation and machine learning at scale within a single universal notebook through built-in integration with Amazon EMR Other General Availability of Syne Tune, an open-source library for distributed hyperparameter and neural architecture optimization Amazon Translate now supports AWS KMS Encryption Amazon Kendra releases AWS Single Sign-On integration for secure search Amazon Transcribe now supports automatic language identification for streaming transcriptions AWS AI for data analytics (AIDA) partner solutions Introducing Amazon Lex Automated Chatbot Designer (Preview) Amazon Kendra launches Experience Builder, Search Analytics Dashboard, and Custom Document Enrichment Other Cool Stuff In The Works – AWS Canada West (Calgary) Region | AWS News Blog Unified Search in the AWS Management Console now includes blogs, knowledge articles, events, and tutorials AWS DeepRacer introduces multi-user account management Amazon Pinpoint launches in-app messaging as a new communications channel Amazon AppStream 2.0 Introduces Linux Application Streaming Amazon SNS now supports publishing batches of up to 10 messages in a single API request Announcing usability improvements in the navigation bar of the AWS Management Console Announcing General Availability of Enterprise On-Ramp Announcing preview of AWS Private 5G AWS Outposts is Now Available in Two Smaller Form Factors Introducing AWS Mainframe Modernization - Preview Introducing the AWS Migration and Modernization Competency Announcing AWS Data Exchange for APIs Amazon WorkSpaces introduces Amazon WorkSpaces Web Amazon SQS Enhances Dead-letter Queue Management Experience For Standard Queues Introducing AWS re:Post, a new, community-driven, questions-and-answers service AWS Resource Access Manager enables support for global resource types AWS Ground Station launches expanded support for Software Defined Radios in Preview Announcing Amazon Braket Hybrid Jobs for running hybrid quantum-classical workloads on Amazon Braket Introducing AWS Migration Hub Refactor Spaces - Preview Well-Architected Framework Customize your AWS Well-Architected Review using Custom Lenses New Sustainability Pillar for the AWS Well-Architected Framework IoT Announcing AWS IoT RoboRunner, Now Available in Preview AWS IoT Greengrass now supports Microsoft Windows devices AWS IoT Core now supports Multi-Account Registration certificates on IoT Credential Provider endpoint Announcing AWS IoT FleetWise (Preview), a new service for transferring vehicle data to the cloud more efficiently Announcing AWS IoT TwinMaker (Preview), a service that makes it easier to build digital twins AWS IoT SiteWise now supports hot and cold storage tiers for industrial data New connectivity software, AWS IoT ExpressLink, accelerates IoT development (Preview) AWS IoT Device Management Fleet Indexing now supports two additional data sources (Preview) Connect Amazon Connect now enables you to create and orchestrate tasks directly from Flows Amazon Connect launches scheduled tasks Amazon Connect launches Contact APIs to fetch and update contact details programmatically Amazon Connect launches API to configure security profiles programmatically Amazon Connect launches APIs to archive and delete contact flows Amazon Connect now supports contact flow modules to simplify repeatable logic Sponsors CMD Solutions Silver Sponsors Cevo Versent

Talk Python To Me - Python conversations for passionate developers
#353: SQLModel: The New ORM for FastAPI and Beyond

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Jan 17, 2022 78:21


Two frameworks that have taken the Python world by storm are FastAPI and Pydantic. Once you already have your data exchange modeled in Pydantic, you might want to use that code for storing it in the database. And, if you have DB models you might want to somehow use them to power and document the APIs built with FastAPI. But the popular ORMs, such as SQLAlchemy and others, far predate Pydantic. But could they be put together? Sebastián Ramírez is here to tell us the answer is yes. We're covering his project SQLModel which is the marriage between Pydantic and SQLAlchemy. Links from the show Sebastián Ramírez: @tiangolo SQLModel: sqlmodel.tiangolo.com Create a SQLModel Model: sqlmodel.tiangolo.com Multiple Models: sqlmodel.tiangolo.com FastAPI Talk Python episode: talkpython.fm/284 FastAPI Dependency Injection: fastapi.tiangolo.com ODMantic for MongoDB: github.com Beanie for MongoDB: github.com Michael's Short video on Pydantic: youtube.com FastAPI courses by Michael: training.talkpython.fm/fastapi-courses Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe on YouTube: youtube.com Follow Talk Python on Twitter: @talkpython Follow Michael on Twitter: @mkennedy Sponsors Datadog Tonic Talk Python Training

Python Bytes
#264 We're just playing games with Jupyter at this point

Python Bytes

Play Episode Listen Later Dec 22, 2021 53:02


Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian's book too! Special guest: Kim van Wyk Michael #0: Take our survey: Should we try to shorten the episodes? Please fill out the 3 question Google Form here We'll be taking a break so see you in two weeks. Also feedback / rate us in your podcast player app Brian #1: Jupyter Games Thorsten Beier “Making their own tiny video games can be a great way for kids to learn programming in a playful matter.” For 2D physics-based games, Box2D, (written in C++), is a 2D rigid body simulation library One Python binding, pyb2d, is from Thorsten Game examples use Ipycanvas, Ipywidgets, and Ipyevents for a place to draw and input events. There are Box2D examples for physics simulations, like internal combustion and a wind tunnel. Game examples, with code, and not that much code billiards Angry Shapes (like Angry birds) World of Goo homage Rocket Color Mixing (it's oddly satisfying to play with, and it's like 73 lines of code, including blank lines and docstring) several more examples Demo games/examples in binder Being able to play with a game engine through Jupyter is kind of amazing. Cool teaching/learning tool. Michael #2: Canary Tokens First, what are canaries (from Thinkst)? These tokens might be useful for finding fallout of Log4Shell But also generally useful Kim #3: pywinauto and PyAutoGUI - libraries for programmatically controlling a GUI-based tool. These can be very handy for simplifying the use of complex GUIs with dozens of options you need to set every time you run them and also for automating GUI tooling as part of a pipeline. Brian #4: A reverse chronology of some Python features Brett Cannon Partly for people wishing for the “good old days” of some old version of Python Brett recommends going down the list and stopping at the first feature you can't live without. If you can't go very far, better not complain about language bloat. I had to stop at 3.10, since I really like the new error messages. Here's an abbreviated list of new features in different Python versions. (And I'm abbreviating it even more for the podcast) Python 3.10 Better error messages, Union operator for types, paraenthesized context managers, match statement (pattern matching) Brett notes that the match statement required a new parser for Python the new parser made better error messages possible so, you can't toss pattern matching without being willing to give up better error messages Python 3.9 dict support for | and |=, type hinting generics for built-in collections Python 3.8 f-string support for =, f``"``{val=}``", := walrus operator (assignment expressions) Python 3.7 dictionaries preserve insertion order, breakpoint() Python 3.6 f-strings, (need we say more) also underscores in numeric literals, async generators and comprehensions, preserving keyword argument order … goes back to 3.1 Michael #5: Hyperactive GCs and ORMs/ODMs Does Python do extremely too many GCs for ORMs? Hint: yes During the execution of that single query against SQLAlchemy, without adjusting Python's GC settings, we get an extreme number of GC collections (1,859 GCs for a single SQLAlchemy query of 20k records). Our fix at Talk Python has been to increase the number of surviving allocations required to force a GC from 700 to 50,000. What can be done to improve this? Maybe someday Python will have an adaptive GC where if it runs a collection and finds zero cycles it backs off and if it starts finding more cycles it ramps up or something like that. For now, test adjusting the thresholds Here are a few presentations / resources: Michael's presentation at Python Web Conf 2021 Talk Python Memory Deep Dive course allocations, gen1, gen2 = gc.get_threshold() # GC every 50K not 700 surviving container allocations. allocations = 50_000 gc.set_threshold(allocations, gen1, gen2) Kim #6: DockerSlim- A tool to reduce the size and improve the security of Docker images. I've used it a little and got some 1Gb Ubuntu-based images down to 50Mb and that was barely scratching the surface. Extras Michael: Emojis for comments Kim: python -m http.server - a small reminder to people that this is a quick way to get files off a Python-equipped system by standing up a simple web server. Mess with DNS - Julia Evans released this really impressive learning tool last week to let people explore DNS settings without breaking real sites. Magit - a slightly tongue-in-cheek addition to last week's discussion on git via both CLI and by mashing buttons in VS Code. Anyone using emacs should strongly consider magit for git - I've kept emacs open even while trying to use other editors because I find magit so indispensable. I've included these just as small items off the top of my head that may or may not be worth a mention. Joke: We use cookies candle (and I don't care about cookies extension) Little Bobby Jindi And more Log4Shell memes

Talk Python To Me - Python conversations for passionate developers

SQLAlchemy is the most widely used ORM (Object Relational Mapper) for Python developers. It's been around since February 2006. But we might be in for the most significant release since the first one: SQLAlchemy 2.0. This version adds async and await support, new context-manager friendly features everywhere, and even a unified query syntax. Mike Bayer is back to give us a glimpse of what's coming and why Python's database story is getting stronger. Links from the show SQLAlchemy: sqlalchemy.org Mike on Twitter: @zzzeek Migrating to SQLAlchemy 2.0: sqlalchemy.org awesome-sqlalchemy: github.com sqlalchemy-continuum versioning: readthedocs.io enum support: github.com alembic: sqlalchemy.org GeoAlchemy: geoalchemy.org sqltap profiling: github.com nplusone: github.com Unit of work: duckduckgo.com ORM + Dataclasses: sqlalchemy.org SQLModel: sqlmodel.tiangolo.com Cython example: cython.org Async SQLAlchemy example: sqlalchemy.org ORM Usages Stats (see ORM section): jetbrains.com Watch this episode on YouTube: youtube.com Episode transcripts: talkpython.fm --- Stay in touch with us --- Subscribe on YouTube: youtube.com Follow Talk Python on Twitter: @talkpython Follow Michael on Twitter: @mkennedy Sponsors TopTal Talk Python Training AssemblyAI

All Jupiter Broadcasting Shows
Tocuched by the Bar | Coder Radio 442

All Jupiter Broadcasting Shows

Play Episode Listen Later Dec 1, 2021


Mike visits Pallet Town and comes back with some SQLAlchemy performance wisdom to share. Meanwhile, struggling with a lack of performance, Chris has kicked the tires of his new M1 Max MacBook Pro and is ready to share his counter-narrative take on the new hardware.

Coder Radio
442: Tocuched by the Bar

Coder Radio

Play Episode Listen Later Dec 1, 2021 47:52


Mike visits Pallet Town and comes back with some SQLAlchemy performance wisdom to share. Meanwhile, struggling with a lack of performance, Chris has kicked the tires of his new M1 Max MacBook Pro and is ready to share his counter-narrative take on the new hardware.

Coder Radio Video
Tocuched by the Bar | Coder Radio 442

Coder Radio Video

Play Episode Listen Later Dec 1, 2021


Mike visits Pallet Town and comes back with some SQLAlchemy performance wisdom to share. Meanwhile, struggling with a lack of performance, Chris has kicked the tires of his new M1 Max MacBook Pro and is ready to share his counter-narrative take on the new hardware.

Building the Backend: Data Solutions that Power Leading Organizations

What tools are you using for data viz? Are they low cost? One option is Apache Superset, in this episode we speak with Robert Stolz to learn more about Superset and other open source data tools. Top 3 Value Bombs: One popular use case with Apache Superset is embedding it within applications because it's open source, there is a wide range of flexibility to integrate it with existing systems.  Apache Superset supports any sources supported by the Python SQL toolkit called SQLAlchemy. DBT encourages a set of best practices around data development (i.e. source control and test driven development). 

Python Bytes
#256 And the best open source project prize goes to ...

Python Bytes

Play Episode Listen Later Oct 29, 2021 59:36


Watch the live stream: Watch on YouTube About the show Sponsored by Shortcut - Get started at shortcut.com/pythonbytes Special guest: The Anthony Shaw Michael #0: It's episode 2^8 (nearly 5 years of podcasting) Brian #1: Where does all the effort go?: Looking at Python core developer activity Łukasz Langa A look into CPython repository history and PR data Also, nice example of datasette in action and lots of SQL queries. The data, as well as the process, is open for anyone to look at. Cool that the process was listed in the article, including helper scripts used. Timeframe for data is since Feb 10, 2017, when source moved to GitHub, through Oct 9, 2021. However, some queries in the article are tighter than that. Queries Files involved in PRs since 1/1/20 top is ceval.c with 259 merged PRs Contributors by number of merged PRs lots of familiar names in the top 50, along with some bots it'd be fun to talk with someone about the bots used to help the Python project nice note: “Clearly, it pays to be a bot … or a release manager since this naturally causes you to make a lot of commits. But Victor Stinner and Serhiy Storchaka are neither of these things and still generate amazing amounts of activity. Kudos! In any case, this is no competition but it was still interesting to see who makes all these recent changes.” Who contributed where? Neat. There's a self reported Experts Index in the very nice Python Developer's Guide. But some libraries don't have anyone listed. The data does though. Łukasz generated a top-5 list for each file. Contributing to some file and have a question. These folks may be able to help. Averages for PR activity core developer authoring and merging their own PR takes on average ~7 days (std dev ±41.96 days); core developer authoring a PR which was merged by somebody else takes on average 20.12 days (std dev ±77.36 days); community member-authored PRs get merged on average after 19.51 days (std dev ±81.74 days). Interesting note on those std deviations: “Well, if we were a company selling code review services, this standard deviation value would be an alarmingly large result. But in our situation which is almost entirely volunteer-driven, the goal of my analysis is to just observe and record data. The large standard deviation reflects the large amount of variation but isn't necessarily something to worry about. We could do better with more funding but fundamentally our biggest priority is keeping CPython stable. Certain care with integrating changes is required. Erring on the side of caution seems like a wise thing to do.” More questions to be asked, especially from the issue tracker Which libraries require most maintenance? Michael #2: Why you shouldn't invoke setup.py directly By Paul Ganssle (from Talk Python #271: Unlock the mysteries of time, Python's datetime that is!) In response to conversation in Talk Python's cibuildwheel episode? For a long time, setuptools and distutils were the only game in town when it came to creating Python packages You write a setup.py file that invokes the setup() method, you get a Makefile-like interface exposed by invoking python setup.py [HTML_REMOVED] The last few years all direct invocations of setup.py are effectively deprecated in favor of invocations via purpose-built and/or standards-based CLI tools like pip, build and tox. In Python 2.0, the distutils module was introduced as a standard way to convert Python source code into *nix distro packages One major problem with this approach, though, is that every Python package must use distutils and only distutils — there was no standard way for a package author to make it clear that you need other packages in order to build or test your package. => Setuptools Works, but sometimes you need requirements before the install (see cython example) A build backend is something like setuptools or flit, which is a library that knows how to take a source tree and turn it into a distributable artifact — a source distribution or a wheel. A build frontend is something like pip or build, which is a program (usually a CLI tool) that orchestrates the build environment and invokes the build backend In this taxonomy, setuptools has historically been both a backend and a frontend - that said, setuptools is a terrible frontend. It does not implement PEP 517 or PEP 518's requirements for build frontends Why am I not seeing deprecation warnings? Use build package. Also can be replaced by tox, nox or even a Makefile Probably should just check out the summary table. Anthony #3: OpenTelemetry is going stable soon Cloud Native Computing Foundation project for cross-language event tracing, performance tracing, logging and sampling for distributed applications. Engineers from Microsoft, Amazon, Splunk, Google, Elastic, New Relic and others working on standards and specification. Formed through a merger of the OpenTracing and OpenCensus projects. Python SDK supports instrumentation of lots of frameworks, like Flask, Django, FastAPI (ASGI), and ORMs like SQLalchemy, or templating engines. All data can then be exported onto various platforms : NewRelic, Prometheus, Jaeger, DataDog, Azure Monitor, Google Cloud Monitoring. If you want to get started and play around, checkout the rich console exporter I submitted recently. Brian #4: Understanding all of Python, through its builtins Tushar Sadhwani I really enjoyed the discussion before he actually got to the builtins. LEGB rule defines the order of scopes in which variables are looked up in Python. Local, Enclosing (nonlocal), Global, Builtin Understanding LEGB is a good thing to do for Python beginners or advanced beginners. Takes a lot of the mystery away. Also that all the builtins are in one The rest is a quick scan through the entire list. It's not detailed everywhere, but pulls over scenic viewpoints at regular intervals to discuss interesting parts of builtins. Grouped reasonably. Not alphabetical Constants: There's exactly 5 constants: True, False, None, Ellipsis, and NotImplemented. globals and locals: Where everything is stored bytearray and memoryview: Better byte interfaces bin, hex, oct, ord, chr and ascii: Basic conversions … Well, it's a really long article, so I suggest jumping around and reading a section or two, or three. Luckily there's a nice TOC at the top. Michael #5: FastAPI, Dask, and more Python goodies win best open source titles Things that stood out to me FastAPI Dask Windows Terminal minikube - Kubernetes cluster on your PC OBS Studio Anthony #6: Notes From the Meeting On Python GIL Removal Between Python Core and Sam Gross Following on from last week's share on the “nogil” branch by Sam Gross, the Core Dev sprint included an interview. Targeted to 3.9 (alpha 3!), needs to at least be updated to 3.9.7. Nogil: Replaces pymalloc with mimalloc for thread safety Ties objects to the thread that created them witha. non-atomic local reference count within the owner thread Allows for (slower) reference counting from other threads. Immortalized some objects so that references never get inc/dec'ed like True, False, None, etc. Deferred reference counting Adjusts the GC to wait for all threads to pause at a safe point, doesn't wait for I/O blocked threads and constructs a list of objects to deallocate using mimalloc Relocates the MRO to a thread local (instead of process-local) to avoid contention on ref counting Modifies the builtin collections to be thread-safe (lists, dictionaries, etc,) since they could be shared across threads. IMHO, biggest thing to happen to Python in 5 years. Encouragingly, Sam was invited to be a Core Dev and Lukasz will mentor him! Extras Michael Python Developers Survey 2021 is open More PyPI CLI updates bump2version via Bahram Aghaei (youtube comment) Was there a bee stuck in Brian's mic last time? Brian PyCon US 2022 CFP is open until Dec 20 Python Testing with pytest, 2nd edition, Beta 7.0 All chapters now there. (Final chapter was “Advanced Parametrization”) It's in technical review phase now. If reading, please skip ahead to the chapter you really care about and submit errata if you find anything confusing. Joke:

Python Bytes
#247 Do you dare to press "."?

Python Bytes

Play Episode Listen Later Aug 26, 2021 46:12


Watch the live stream: Watch on YouTube About the show Special guest: Dan Taylor Michael #1: Keep your computer awake during long processing For now, use Michael's fork when on macOS. Until this PR is merged. Do you have work that will take a long time? Keeping your OS working away is just a context block from wakepy import keepawake with keepawake(keep_screen_awake=False): ... # do stuff that takes long time Brian #2: How to write a great Stack Overflow question via Kevin Markham The punchline (but it's not enough) Write a brief introduction Provide a self-contained code example Detail the expected results and why I expect those results Add any important notes Link to any relevant questions Write a title that summarizes the question Kevin starts with a question about pandas dataframes and filling in missing values. The question is really application specific The rewrite of the question is awesome Simplifies the problem into a toy example, literally, and out of the domain specific context. Includes example code that can copied, pasted, and run that sets up the problem Uses short and simple variable names Talks about expected results. And why he expects those results. Includes a dataset in the sample code that covers cases the solution needs to provide Includes non-obvious requirements or non-requirements Links to related questions and why they don't solve your problem. I don't think I've ever seen this, but I think it'd be cool to add test code that will pass when the problem is solved. But that might make the question unnecessarily long. Dan #3: Github.dev - press ‘.' to edit code in any GitHub repo Fun bonus feature released at the same time as GitHub Codespaces Runs VS Code entirely in your browser - supercharged “edit button” Nothing to install There's no server to pay for, though functionality is limited The file system is your browser's local storage and GitHub repo You can add files and commit changes directly to your repo You can install extensions that support running in “VS Code Web” Added basic web support to the Python Extension just yesterday Syntax checking, auto-complete, go-to-definition Uses type hints for packages (no python interpreter in the browser) You can also install vscode-pyiodide to run Python code using Jupyter+Pyiodide Overall means you can do more powerful code editing quickly in GitHub.com, I'm looking forward to seeing how this evolves Michael #4: Log analyzer (minus google analytics) GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser. Features Fast, real-time, millisecond/second updates, written in C Only ncurses as a dependency Nearly all web log formats (Apache, Nginx, Amazon S3, Elastic Load Balancing, CloudFront, Caddy, etc) Simply set the log format and run it against your log Beautiful terminal and bootstrap dashboards (Tailor GoAccess to suit your own color taste/schemes) Brian #5: KMK: Clackety Keyboards Powered by Python recommended by Blaise “firmware for computer keyboards written and configured in CircuitPython.” Cool list of features Fully configured through a single, easy to understand Python file. Single-piece or two-piece split keyboards are supported Chainable keys such as KC.LWIN(KC.L) to lock the screen on a Windows PC Built-in unicode macros, including emojis RGB underglow and LED backlights One key can turn into many more based on how many times you tap it One writeup I found of someone using it for a 10-key KMK: run Python on your keyboard includes a video Seems like limited hardware so far, and although the coding might not be too difficult, you still gotta swap out of the circuitboard. I'm bringing this topic up because I'm hoping some keyboard kit people will put together something that just starts with the ability to run CircuitPython so I can just skip to the coding part. Dan #6: SQLModel - use the same models for SQL and FastAPI via Sebastián Ramírez (creator of SQLModel and FastAPI) Write a schema once and use everywhere, reduces a lot of repetitive code Traditionally have to manage several layers of code to pass your data from database queries, to the backend code, expose to your API and consume from the client Code-first ORMs (SQLAlchemy, Django ORM) make it easy to write code that generates SQL FastAPI makes it easy to expose objects to your API using Pydantic models Before you would need to create both models and convert from ORM to Pydantic using .from_orm SQLModel unifies those: a SQLModel is both a SQLAlchemy model and a Pydantic model You can use SQLModel to interact with the database (via wrapping SQLAlchemy) You can use that same model as a Pydantic model in FastAPI requests and responses FastAPI also uses the Pydantic models to generate an openapi.json, meaning you could generate a client library in any language using OpenAPI Generator Some other cool things: Designed using type annotations so that editors like VS Code, PyCharm give great auto-complete out of the box, uses the proposed dataclass_transforms spec for dynamic typing Supports async database sessions, alembic migrations because it's based on SQLAlchemy (not yet documented) Should be possible to integrate with postgis, ts_vectors Extras Brian pip install ./local_directory is pretty interesting. Test & Code 163 The way pip installs from a local directory is about to change. Stéphane Bidoul joins the show to talk about it. Dan type4py - using ML to add type annotations to your codebase retrofitting codebases with types is a pain — static type checkers can only infer so much type4py research paper outlines a state of the art ML model for inferring types, adopting some techniques used in computer vision Open sourced training code, data set, VS Code extension, and inferencing server If you have a need to add type annotations to a large code base, worth giving this a try! WARNING the VS Code extension sends code tokens to their API on type4py.com (they do have a privacy policy) — if this is a concern be sure to host the inferencing server yourself! Joke: Continuous Deployment Also: “If a programmer gets an interview because of a recommendation from a friend, are they being passed by reference?” From @CarlaNotarobot, via @bluefiddleguy

Talk Python To Me - Python conversations for passionate developers
#328: Piccolo: A fast, async ORM for Python (updated)

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later Aug 8, 2021 58:51


ORMs are one of the main tools to put first-class data access in the hands on non-SQL-loving developers and even for those who do love SQL, making them way more productive. When you hear about ORMs in Python, we often hear about either SQLAlchemy and Django ORM. And we should, they are great. But there are newer ORMs that take better advantage of modern Python. On this episode, you'll meet Daniel Townsend. He's the creator of Piccilo ORM. A great ORM that is async first, but also has synchronous APIs. It has a super clean query syntax. And, it's easy to learn. Links from the show Dan on Twitter: danieltownsend Piccolo ORM: piccolo-orm.com Piccolo on GitHub: github.com Little Bobby Tables joke: bobby-tables.coml Syntax example: github.com Piccolo Admin: piccolo-orm.readthedocs.io Python's Pathlib: docs.python.org Episode transcripts: talkpython.fm Sponsors Linode Talk Python Training AssemblyAI

Python Bytes
#245 Fire up your Python time machine (and test some code)

Python Bytes

Play Episode Listen Later Aug 4, 2021 41:56


Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian's book too! Special guest: Juan Pedro Araque Espinosa (Youtube Chanel: Commit that Line) Michael #1: State of the community (via Jet Brains) This report presents the combined results of the fifth annual Developer Ecosystem Survey conducted by JetBrains Not just Python, but all of us Python is more popular than Java in terms of overall usage, while Java is more popular than Python as a main language. The 5 fastest growing languages are Python, TypeScript, Kotlin, SQL, and Go. A majority of the respondents (71%) develop for web backend. Does fall into the trap of “Hi, I'm a CSS developer, nice to meet you” though Women are more likely than men to be involved in data analysis, machine learning, and UX/UI design or research. Women are less likely than men to be involved in infrastructure development and DevOps, system administration, or Deployment. Brian #2: Cornell - record & replay mock server Suggested by Yael Mintz (and it's her project) Introduction blog post “Cornell makes it dead simple, via its record and replay features to perform end-to-end testing in a fast and isolated testing environment. When your application integrates with multiple web-based services, end-to-end testing is crucial before deploying to production. Mocking is often a tedious task. It becomes even more tiresome when working with multiple APIs from multiple vendors. vcrpy is an awesome library that records and replays HTTP interactions for unit tests. Its output is saved to reusable "cassette" files. By wrapping vcrpy with Flask, Cornell provides a lightweight record and replay server that can be easily used during distributed system testing and simulate all HTTP traffic needed for your tests.” Juanpe #3: Factory boy (with Pydantic by chance) Factory_boy allows creating factories to generate objects that could be used as text fixtures Briefly mentioned in the past in episode 193 A factory takes a base object and allows to very easily and naturally define default values for each field of the object. One can have many factories for the same object that could be used define different types of fixtures of the same object It works with ORM objects (Django, Mongo, SQLAlchemy…) If you have a project that uses Pydantic to define your objects, factory boy also supports Pydantic although it is not documented and does it by a side effect Internally factory boy generates a parameters dictionary that that is unpacked when constructing the model at hands. This works perfectly with pydantic and can be used to generate pydantic objects on the fly with the full power of factory boy Michael #4: pyinstrument Call stack profiler for Python. Shows you why your code is slow! Instead of writing python script.py, type pyinstrument script.py Your script will run as normal, and at the end (or when you press ^C), Pyinstrument will output a colored summary showing where most of the time was spent. Async support! Pyinstrument now detects when an async task hits an await, and tracks time spent outside of the async context under this await. Pyinstrument also has a Python API. Just surround your code with Pyinstrument Nice middleware examples for Flask & Django Brian #5: Python 3.10 is now in Release Candidate phase. RC1 just released. RC2 planned for 2021-09-06 official release is planned for 2021-10-04 It is strongly encourage maintainers of third-party Python projects to prepare their projects for 3.10 compatibility during this phase Reminder of major changes: PEP 623 -- Deprecate and prepare for the removal of the wstr member in PyUnicodeObject. PEP 604 -- Allow writing union types as X | Y PEP 612 -- Parameter Specification Variables PEP 626 -- Precise line numbers for debugging and other tools. PEP 618 -- Add Optional Length-Checking To zip. bpo-12782: Parenthesized context managers are now officially allowed. PEP 632 -- Deprecate distutils module. PEP 613 -- Explicit Type Aliases PEP 634 -- Structural Pattern Matching: Specification PEP 635 -- Structural Pattern Matching: Motivation and Rationale PEP 636 -- Structural Pattern Matching: Tutorial PEP 644 -- Require OpenSSL 1.1.1 or newer PEP 624 -- Remove Py_UNICODE encoder APIs PEP 597 -- Add optional EncodingWarning Juanpe #6: time-machine Time-machine mock datetime and time related calls globally noticeably faster than other well known tools like freezgun. The mocking is achieved by replacing the c-level calls by whatever value we want which means the library does not need to mock individual imports. Mocking datetime cannot be done with patch.object and needs to be patched everywhere it is used which can turn mocking everything into a tedious (and/or slow) process. Datetime methods (now, today, utcnow…) can be mocked by setting a frozen time or by letting the time tick since the mock call is made. It provides a simple context manager to use it as well as pytest fixture that makes using it very simple from datetime import datetime import time_machine @time_machine.travel("2021-01-01 21:00") def test_in_the_past(): assert datetime.now() == datetime(2021, 1, 1, 21, 0) --------------------------------- # The time_machine fixture can also be used with pytest def test_in_the_past(time_machine): time_machine.move_to(datetime(2021, 1, 1, 21, 0)) assert datetime.now() == datetime(2021, 1, 1, 21, 0) Extras Michael Credit-card stealing malware found in official Python repository and Software downloaded 30,000 times from PyPI ransacked developers' machines (via Joe Riedly) Brian Flavors of TDD - Test & Code episode 162 Working on tox and CI chapter of 2nd edition of pytest book, hoping that to be released within the next week. Joke JavaScript Developer Bouncing from framework to framework

Python Bytes
#239 No module named pythonbytes

Python Bytes

Play Episode Listen Later Jun 23, 2021 43:09


Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian's book too! Special guest: Nick Muoh Brain #1: ormar : an async mini ORM for Python, with support for Postgres, MySQL, and SQLite. suggested by John Hagen From John: “It's a really cool ORM that combines Pydantic models and SQL models into a single definition. What is great about this, is it can be used to reduce repetitive duplication between Models for an ORM and the Pydantic Models that FastAPI needs to describe serialization. … If you have very pure-data heavy abstractions where your input and outputs through the API are roughly equivalent to your database, this helps you avoid needing to duplicate tons of SQLAlchemy classes and Pydantic that look identical and now you need to keep them in sync (DRY issue).” Michael #2: No module named via Garett Dunn Website: nomodulenamed.com Get an error like Python Error: No module named dateutil, maybe you need pip install python_dateutil (reference) Nick #3: JupyterLite Jeremy Tuloup JupyterLite is a JupyterLab distribution that runs entirely in the browser built from the ground-up using JupyterLab components and extensions. Python kernel backed by Pyodide running in a Web Worker Kernels include Python 3.8 (pyolite implementation) Javascript P5.js Data is written to in-browser storage Data doesn't leave the browser unless you are using extensions or use browser's fetch API Brian #4: Lot of plots Dylan Castillo Side by side comparison of plots. with: pandas, matplotlib, seaborn, plotly.express plotting: line, grouped bars, stacked bars, area, pie/donut, histogram, scatter, and box Many plotting articles talk about cool stuff you can do with a particular library. This is nice in that they all can do these things, so you can see the output of each and compare see the code that goes into making each, and see what style of api you might like to work with Michael #5: Monty, Mongo tinified. MongoDB implemented in Python Monty, Mongo tinified. MongoDB implemented in Python Inspired by TinyDB and it's extension TinyMongo A pure Python-implemented database that looks and works like MongoDB.

Python Bytes
#237 Separate your SQL and Python, asynchronously with aiosql

Python Bytes

Play Episode Listen Later Jun 9, 2021 39:41


Watch the live stream: Watch on YouTube About the show Sponsored by Sentry: Sign up at pythonbytes.fm/sentry And please, when signing up, click Got a promo code? Redeem and enter PYTHONBYTES Special guest: Mike Groves Michael #1: Textual Textual (Rich.tui) is a TUI (Text User Interface) framework for Python using Rich as a renderer. Rich TUI will integrate tightly with its parent project, Rich. This project is currently a work in progress and may not be usable for a while. Brian #2: Pinning application dependencies with pip-tools compile via John Hagen pip-tools has more functionality than this, but compile alone is quite useful Start with a loose list of dependencies in requirements.in: rich Can have things like >= and such if you have fixed dependencies. Now pip install pip-tools, and pip-compile requirements.in or python -m piptools compile requirements.in both have same effect. Now you'll have a requirements.txt file with pinned dependencies: # autogenerated by: pip-compile requirements.in click==7.1.2 # via typer colorama==0.4.4 # via rich commonmark==0.9.1 # via rich pygments==2.9.0 # via rich rich==10.2.2 # via -r requirements.in typer==0.3.2 # via -r requirements.in Now, do the same with a dev-requirements.ini to create dev-requirements.txt. Then, of course: - `pip install -r requirements.txt` - `pip install -r dev-requirements.txt` - And test your application. - All good? Push changes. To force pip-compile to update all packages in an existing requirements.txt, run pip-compile --upgrade. John provided an example project that uses this workflow: python-blueprint Mike #3: Pynguin Automated test generation Pynguin is a framework that allows automated unit test generation for Python. It is an extensible tool that allows the implementation of various test-generation approaches. Michael #4: Python Advisory DB via Brian Skinn A community owned repository of advisories for packages published on pypi.org. Much of the existing set of vulnerabilities are collected from the National Vulnerability Database CVE feed. Vulnerabilities are integrated into the Open Source Vulnerabilities project, which provides an API to query for vulnerabilities. Longer term, we are working with the PyPI team to build a pipeline to automatically get these vulnerabilities [listed] into PyPI. Tracks known security issues with the packages, for example: PYSEC-2020-28.yaml id: PYSEC-2020-28 package: name: bleach ecosystem: PyPI details: In Mozilla Bleach before 3.12, a mutation XSS in bleach.clean when RCDATA and either svg or math tags are whitelisted and the keyword argument strip=False. affects: ranges: - type: ECOSYSTEM fixed: 3.1.2 versions: - '0.1' - 0.1.1 - 0.1.2 - '0.2' ... Brian #5: Function Overloading with singledispatch and multipledispatch by Martin Heinz I kinda avoid using the phrase “The Correct Way to …”, but you do you, Martin. In C/C++, we can overload functions, which means multiple functions with the same name but different parameter types just work. In Python, you can't do that automatically, but you can do it. It's in the stdlib with functools and singledispatch: from functools import singledispatch from datetime import date, time @singledispatch def format(arg): return arg @format.register def _(arg: date): return f"{arg.day}-{arg.month}-{arg.year}" @format.register(time) def _(arg): return f"{arg.hour}:{arg.minute}:{arg.second}" Now format works like two functions: print(format(date(2021, 5, 26))) # 26-5-2021 print(format(time(19, 22, 15))) # 19:22:15 What if you want to switch on the type of multiple parameters? multipledispatch, a third party package, does the trick: from multipledispatch import dispatch @dispatch(list, str) def concatenate(a, b): a.append(b) return a @dispatch(str, str) def concatenate(a, b): return a + b print(concatenate(["a", "b"], "c")) # ['a', 'b', 'c'] print(concatenate("Hello", "World")) # HelloWorld Mike #6: Aiosql Fast Async SQL Template Engine Lightweight replacement for ORM libraries such as SQLAlchemy. Extras Michael SoftwareX Journal, Elsevier has had an open-access software journal, via Daniel Mulkey. There's even a special issue collection on software contributing to gravitational wave discovery. Python 3.10.0b2 is available Django security releases issued: 3.2.4, 3.1.12, and 2.2.24 Talks on YouTube for PyCon 2021. aicsimageio 4.0 released, lots of goodness for bio-image analysis and microscopy, thanks Madison Swain-Bowden. Mike Postponement of PEP 563 in 3.10 Joke Bank robbers A book about Rich

Talk Python To Me - Python conversations for passionate developers
#317 Python at the US Federal Election Commission

Talk Python To Me - Python conversations for passionate developers

Play Episode Listen Later May 21, 2021 52:39


When you think of government software development and projects, do you fast apps and modern tech stacks jump to mind? Probably not. So you'll be delighted to hear from our guest, Laura Beaufort. She's the Tech Lead at the US Federal Election Commission. She and her team have built a very modern tech stack running modern Flask web apps with APIs powered by SQLAlchemy and Flask-RESTFUL. The app is available open-source on GitHub. And they deploy it with continuous delivery out to cloud.gov. There are lots of lessons to learn for governmental agencies around the world as well as private organizations, small and large. Links from the show Laura on Twitter: @laurabeaufort Wagtail CMS: wagtail.io FEC: fec.gov 18F: 18f.gsa.gov Open source at the FEC: code.gov Cloud.gov PaaS: cloud.gov 18F De-risking Guide: derisking-guide.18f.gov US Digital Services episode: talkpython.fm Digital Services Playbook: playbook.cio.gov Digital.gov Communities of practice: digital.gov FEC Github Repos: github.com Laura's presentation to community of practice: youtube.com YouTube Live Stream: youtube.com Sponsors Square Talk Python Training

Data – Software Engineering Daily
Preset: Visualizing Big Data with Srini Kadamati

Data – Software Engineering Daily

Play Episode Listen Later May 20, 2021 46:53


Apache Superset is an open-source, fast, lightweight and modern data exploration and visualization platform. It can connect to any SQL based data source through SQLAlchemy at petabyte scale. Its architecture is highly scalable and it ships with a wide array of visualizations. The company Preset provides a powerful, easy to use data exploration and visualization The post Preset: Visualizing Big Data with Srini Kadamati appeared first on Software Engineering Daily.

Podcast – Software Engineering Daily
Preset: Visualizing Big Data with Srini Kadamati

Podcast – Software Engineering Daily

Play Episode Listen Later May 20, 2021 53:46


Apache Superset is an open-source, fast, lightweight and modern data exploration and visualization platform. It can connect to any SQL based data source through SQLAlchemy at petabyte scale. Its architecture is highly scalable and it ships with a wide array of visualizations. The company Preset provides a powerful, easy to use data exploration and visualization The post Preset: Visualizing Big Data with Srini Kadamati appeared first on Software Engineering Daily.

Software Daily
Preset: Visualizing Big Data with Srini Kadamati

Software Daily

Play Episode Listen Later May 20, 2021


Apache Superset is an open-source, fast, lightweight and modern data exploration and visualization platform. It can connect to any SQL based data source through SQLAlchemy at petabyte scale. Its architecture is highly scalable and it ships with a wide array of visualizations. The company Preset provides a powerful, easy to use data exploration and visualization

Software Engineering Daily
Preset: Visualizing Big Data with Srini Kadamati

Software Engineering Daily

Play Episode Listen Later May 20, 2021 46:53


Apache Superset is an open-source, fast, lightweight and modern data exploration and visualization platform. It can connect to any SQL based data source through SQLAlchemy at petabyte scale. Its architecture is highly scalable and it ships with a wide array of visualizations. The company Preset provides a powerful, easy to use data exploration and visualization The post Preset: Visualizing Big Data with Srini Kadamati appeared first on Software Engineering Daily.

Python en español
Python en español #10: Tertulia 2020-12-09

Python en español

Play Episode Listen Later Apr 23, 2021 110:46


Más sobre persistencia de datos https://podcast.jcea.es/python/10 En esta ocasión grabamos un miércoles porque ayer fue festivo en España. Participantes: Eduardo Castro, email: info@ecdesign.es. Conectando desde A Guarda. Jesús Cea, email: jcea@jcea.es, twitter: @jcea, https://blog.jcea.es/, https://www.jcea.es/. Conectando desde Madrid. Miguel Sánchez, email: msanchez@uninet.edu, conectando desde Canarias. Víctor Ramírez, twitter: @virako, programador python y amante de vim, conectando desde Huelva. Artur, conectando desde Vigo. Audio editado por Pablo Gómez, twitter: @julebek. La música de la entrada y la salida es "Lightning Bugs", de Jason Shaw. Publicada en https://audionautix.com/ con licencia - Creative Commons Attribution 4.0 International License. [00:52] Problemas de sonido. [01:57] "Duda/problema con mod_wsgi-express" Referencia a un mensaje enviado a la lista de correo. Los módulos se importan una sola vez. mod_wsgi: https://pypi.org/project/mod-wsgi/. matplotlib: https://matplotlib.org/. Damos con la solución: Ojo con los objetos globales y múltiples hilos. [07:52] Python 3.9.1. PEP 384: https://www.python.org/dev/peps/pep-0384/. Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API: https://bugs.python.org/issue41986. [09:07] Estado de persistencia en Python. ZODB: http://www.zodb.org/en/latest/. Durus: https://www.mems-exchange.org/software/DurusWorks/. [10:07] ¿Cómo conectar la tecnología de persistencia con el mundo de Python asíncrono? [11:47] Según la opinión de Jesús Cea, la implementación actual de async/await en Python es... fea. La idea es buena, pero la implementación es chapucera y poco transparente. Es muy difícil combinar los mundos síncronos y asíncronos. Las librerías tienen que tomar partido. El código asíncrono "contamina" todo el programa. [15:52] Moderación en la lista de correo. [18:47] Reconducimos la tertulia. ¿Estáis usando Python 3.9? Las distribuciones no están a la última. Cada cliente tiene instalado algo distinto. Utilizar cosas como Docker https://es.wikipedia.org/wiki/Docker, para independizarte de la versión orifial del Sistema Operativo. Los tests te salvan el día a la hora de actualizar de versión. [25:22] Sistemas de tests avanzados. Hypothesis: https://pypi.org/project/hypothesis/. Prueba de mutación: https://es.wikipedia.org/wiki/Prueba_de_mutaci%C3%B3n. [27:37] Podcasts en inglés que escucha Jesús: Python Bytes https://pythonbytes.fm/. Seis temas, media hora. Semanal. Opinión con criterio. Podcast de testing: Test & Code https://testandcode.com/. [30:52] Justificar actualizar a versiones modernas de Python. No suele haber problemas de compatibilidad actualizando a versiones más modernas de Python 3, y los cambios necesarios -si los hay- son menores. Problema: Los paquetes precompilados de librerías complejas pueden tardar en estar disponible para la nueva versión de Python. Muchas librerías complejas no publican versiones precompiladas de forma retroactiva para las versiones nuevas de Python cuando salen, hay que esperar a que saquen una nueva versión de la librería, a veces meses después. Si tardas en actualizar, actualizar múltiples versiones de golpe puede ser muy costoso. [34:32] El nuevo "resolver" de dependencias de PIP https://pyfound.blogspot.com/2020/11/pip-20-3-new-resolver.html. Se puede usar la opción -use-deprecated=legacy-resolver. Librerías compatibles con versiones nuevas de Python, pero que PIP no quiere instalar porque en los descriptores del proyecto no dice que sea compatible. Esto es un problema cuando sale una versión nueva de Python. [38:24] ¿Desde dónde conectamos cada uno? Spam de Jesús en las listas de correo. ¿Qué pasa con la gente de hispanoamérica? Mucha gente conectando desde Vigo y alrededores. Comunidades técnicas en el entorno de Vigo. Vigo Tech Alliance https://vigotech.org/. A Industriosa https://aindustriosa.org/. [43:42] Aviso de que las tertulias se graban. [44:42] Las ideas de Jesús Cea sobre las tertulias. [46:37] Bases de datos. SQLAlchemy https://www.sqlalchemy.org/. Modelos de datos. Diversas bases de datos. PostgreSQL: https://www.postgresql.org/. MySQL: https://www.mysql.com/. MongoDB: https://www.mongodb.com/. Jesús Cea usa sistemas de persistencia. Se ha hablado mucho de esto en una tertulia anterior. [51:42] Persistencia en Python. Tema abordado de forma extensa en la tertulia anterior: https://podcast.jcea.es/python/9. Revisa el audio y/o las notas de esa grabación. [01:02:52] La persistencia no usa teoría relacional. Trabajando con persistencia, no puedes traerte tus ideas de teoría relacional. Se trabaja de otra manera. Acceso al sistema de persistencia a través de un API. [01:09:27] Nuevas incorporaciones a la tertulia. [01:10:12] ¿ORM de Django https://www.djangoproject.com/ o SQLAlchemy https://www.sqlalchemy.org/? [01:14:32] Jesús insiste en sus sistemas de persistencia. ZODB: http://www.zodb.org/en/latest/. ¿Cómo se actualiza la definición de objetos? Jesús describe las dos técnicas que usa: Versión global de la base de datos con actualización en el arranque. Cada objeto tiene su versión y se actualiza al cargarlo en memoria. Los objetos son objetos nativos de Python. Para que otros lenguajes puedan acceder a los datos hay que proporcionarles un API. [01:26:32] Tecnología "publicar & suscribir" https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern. Event Sourcing https://dev.to/barryosull/event-sourcing-what-it-is-and-why-its-awesome. Lenguaje Linda https://en.wikipedia.org/wiki/Linda_(coordination_language). RabbitMQ: https://www.rabbitmq.com/. ZeroMQ: https://zeromq.org/. Redis: https://redis.io/. Pyro: https://pyro5.readthedocs.io/en/latest/. Colas persistentes. BerkeleyDB: https://en.wikipedia.org/wiki/BerkeleyDB. [01:40:37] Open Source y mantenedores quemados. Github: https://github.com/. Github actions: https://docs.github.com/en/actions. [01:49:54] Final.

Python Bytes
#227 No more awaiting, async comes to SQLAlchemy

Python Bytes

Play Episode Listen Later Mar 31, 2021 33:08


Watch the live stream: Watch on YouTube About the show Sponsored by us! Special guest: Micaela Reyes Brian #1: Number One, that's "retract plank," not "remove plank." Yanking vs removing versions on PyPI https://twitter.com/nedbat/status/1376901333958201352?s=20 https://pypi.org/help/#yanked see also https://doughellmann.com/posts/so-youve-released-a-broken-package-to-pypi-what-do-you-do-now/ Michael #2: SQLAlchemy 1.4.0 Released Exciting: 1st release to properly support an async API Has a new select() + execute() rather than session.query() API Intended to unify Core and ORM. See new vs. old API compared. Requires aiosqlite for async API + SQLite: conn_str = 'sqlite+aiosqlite:///filename' Micaela #3: django-tenants by Tom Turner Multi-tenancy Implementation for Django (typically for SaaS websites e.g. Shopify) currently on v3.2.1 (Aug 2020) release Requirements: Django 2 and PostgreSQL It was largely based on django-tenant-schemas library Data Architecture: shared database, separate schema for each tenant Domain setup / URL routing for root and per tenant: Examples: http://my-domain.com:8000/ http://tenant.my-domain.com:8000/ http://tenant2.my-domain.com:8000/ Possible Use-cases: a hospital with different branches restaurant franchise with different branches Possible Limitations: You can’t use the normal migration commands (python manage.py migrate_schemas instead of python manage.py migrate) Reports - when you need to create a report regarding all the clients/tenants, tenant data will be on separate schemas see also: How to get Django Tenants up and Running Brian #5: pre-commit ci pre-commit is “a framework for managing and maintaining multi-language pre-commit hooks.” Hooks can be run during commits, but also hooked other events, such as merge, push, after switching branches, etc. Even if you run pre-commit yourself, it’d be nice to make sure all hooks are run by people submitting pull requests. pre-commit ci *is a service that “enforces that these issues are discovered (which is opt-in for each developer's workflow via *pre-commit) but also fixes the issues automatically, letting developers focus their time on more valuable problems.” Michael #4: Snyk (Python) Package Advisor via David Smit Provides package health score, built up from Popularity Maintenance Security Community Code of conduct and related metrics Number of releases, commits, maintainers, age, etc. Lots of nice graphs and ways you can contribute Micaela #6: PyWebIO by Wang Weimin Allows you build simple web applications or browser-based GUI applications without the need to write HTML and JavaScript. Has input and output modules Based on tornado Possible Use-cases: Hobby projects - for people who know how to write Python code but want to do away with JavaScript Could be a good teaching tool - ex. if you’re teaching kids or beginners and you want to make them appreciate the concept of input and output Possible Limitation: once you need to style your HTML, it might be a bit difficult to do so since it’s tightly coupled with the Python code Extras Michael absolufy-imports by Marco Gorelli Anthony Shaw actually made a Beanie Baby in the terminal within a day of the last episode! PHP supply chain hack Brian packages: pytest-yuk, pytest-srcpaths, pytest-check Micaela Last day of March membership drive for the PSF https://twitter.com/ThePSF/status/1377000184375296003 Joke: Commenting your code

Python Bytes
#217 Use your cloud SSD for fast, cross-process caching

Python Bytes

Play Episode Listen Later Jan 19, 2021 38:38


Sponsored by Linode! pythonbytes.fm/linode Special guest: Ogi Moore Watch the live stream on YouTube. Michael #1: diskcache via Ian Maurer Python disk-backed cache (Django-compatible). Faster than Redis and Memcached. Pure-Python. The cloud-based computing of 2020 puts a premium on memory. Gigabytes of empty space is left on disks as processes vie for memory. Among these processes is Memcached (and sometimes Redis) which is used as a cache. Wouldn't it be nice to leverage empty disk space for caching? Features: Pure-Python Fully Documented Benchmark comparisons (alternatives, Django cache backends) 100% test coverage Hours of stress testing Performance matters Django compatible API Thread-safe and process-safe Supports multiple eviction policies (LRU and LFU included) Keys support "tag" metadata and eviction Developed on Python 3.8 Tested on CPython 3.5, 3.6, 3.7, 3.8 Tested on Linux, Mac OS X, and Windows Tested using Travis CI and AppVeyor CI Brian #2: TOML is 1.0.0 now. What does that mean for Python? Hopefully, some kind of toml parser will make it into Python core. Any Python access to 1.0.0? Mixed Implementations and TOML version support page lists: pytomlpp supports 1.0.0-rc.3, which is a wrapper around C++ tomlplusplus, which does support 1.0.0. Confusing tomlkit supports 1.0.0-rc.1, so that’s promising toml supports 0.5.0, great name. It’d be cool if it would support 1.0.0 What’s different between 0.5.0 and 1.0.0? Unless I’m mistaken, not much: CHANGELOG 1.0.0-rc1 Leading zeroes in exponent parts of floats are permitted. Allow raw tab characters in basic strings and multi-line basic strings. Allow heterogenous values in arrays. Other than that, lots of “Clarify …”, which I’m not sure how those all affect implementation. I’d love to hear more from people who know more about this Ogi #3: pyqtgraph pyqtgraph - plotting library, for when you need fast/interactive plots Uses qt5 (and soon qt6) bindings to generate plots within Qt applications Fills a niche role, want easy mouse interactivity, running locally on a machine Often used in engineering/scientific applications when looking at a lot of data, and wanting interactivity Michael #4: Parler + Python = Insurrection in public via Jim Kring and Mark Little According to Wikipedia: Parler (/ˈpɑːrlər/) is an American alt-tech microblogging and social networking service. Parler has a significant user base of Donald Trump supporters, conservatives, conspiracy theorists, and right-wing extremists. ArsTechnica article send in by Mark Little Ars: Parler’s amateur coding could come back to haunt Capitol Hill rioters Coding mess A key reason for her success: Parler’s site was a mess. Its public API used no authentication. When users deleted their posts, the site failed to remove the content and instead only added a delete flag to it. Oh, and each post carried a numerical ID that was incremented from the ID of the most recently published one. Another amateur mistake was Parler’s failure to scrub geolocations from images and videos posted online. Some 80 terabytes of posts, 1M videos, many already deleted, preserved for posterity. Catalog and Python pointed out by Shaun King. See the catalog (maybe, it’s the ugly side of people). The gist: https://gist.github.com/kylemcdonald/d8884da1a82ef50754ee49e0b6561071 Partially back online with Russian hosting service? Brian #5: Best-of Web Development with Python Suggested by Douglas Nichols Cool list with nice icons Covers Frameworks, HTTP Clients, Servers Auth tools, HTML Processing, URL utilities OpenAPI, GraphQL, Websocket RPC, Serverless, Content Management Web Testing, Web Forms, Markdown Third-party APIs Email, Web Scraping & Crawling, Monitoring Admin UI API Proxies Flask/FastAPI/Pyramid/Django Utilities Nice to see lots of FastAPI projects: fastapi-sqlalchemy - Adds simple SQLAlchemy support to FastAPI. fastapi-plugins - FastAPI framework plugins. fastapi_contrib - Opinionated set of utilities on top of FastAPI. starlette_exporter - Prometheus exporter for Starlette and FastAPI. fastapi-utils - Reusable utilities for FastAPI. fastapi-code-generator - This code generator creates FastAPI app from an.. slowapi - A rate limiter for Starlette and FastAPI. fastapi-versioning - api versioning for fastapi web applications. fastapi-react - Cookiecutter Template for FastAPI + React Projects. Using.. fastapi_cache - FastAPI simple cache. Ogi #6: Assorted Pyjion - https://github.com/tonybaloney/Pyjion a JIT extension for CPython that compiles python code using .NET 5 CLR CuPy - NumPy compatible multi-dimensional array on CUDA, uses _``*array_function_* (enabled with numpy 1.17) code using numpy to operate directly on CuPy arrays see NEP-18 and CuPy docs compatible with other libraries as well Extras: Michael: Trying Firefox + Brave + VPN Python Web Conf 2021 call for talks, due Jan 29, I’ll be speaking! PyCon US 2021 launched call for proposals: December 22, 2020 — Call for proposals opened February 12, 2021 — Proposals are due March 16, 2021 — Notifications will be sent to presenters March 23, 2021 — Deadline for speakers to confirm participation March 30, 2021 — Schedule is publicly released April 28, 2021 — Deadline to submit pre-recorded presentation (tutorials will be live) May 12-13, 2021 — Tutorial days May 15-16, 2021 — Conference days Apple launching Racial Equity and Justice Initiatives with partners across a broad range of industries and backgrounds — from students to teachers, developers to entrepreneurs, and community organizers to justice advocates Brian: PyCascades 2021 schedule https://2021.pycascades.com/program/schedule/ Ogi: Anthony Explains Video Series Learn X in Y minutes Reading Working in Public by Nadia Eghbal - provides some sanity checks for existing maintainers, might be a fantastic perspective for new contributors to open source Joke Tech Support, 2x Working at the help desk? Get the theme song: Here to help song And help by chat: "Running a successful open source project is just Good Will Hunting in reverse, where you start out as a respected genius and end up being a janitor who gets into fights." - Byrne Hobart

The Real Python Podcast
The Python Modulo Operator & Managing Data With SQLite and SQLAlchemy

The Real Python Podcast

Play Episode Listen Later Nov 6, 2020 52:48


Are you ready to move beyond flat files for your data in Python? Maybe you're not sure where to start with databases and SQL. This week on the show, David Amos returns with another batch of PyCoder’s Weekly articles and projects. We cover a Real Python article about managing data with SQLite and SQLAlchemy.

Test & Code - Python Testing & Development
129: How to Test Anything - David Lord

Test & Code - Python Testing & Development

Play Episode Listen Later Sep 7, 2020 42:08


I asked people on twitter to fill in "How do I test _____?" to find out what people want to know how to test. Lots of responses. David Lord agreed to answer them with me. In the process, we come up with lots of great general advice on how to test just about anything. Specific Questions people asked: What makes a good test? How do you test web app performance? How do you test cookie cutter templates? How do I test my test framework? How do I test permission management? How do I test SQLAlchemy models and pydantic schemas in a FastAPI app? How do I test warehouse ETL code? How do I test and mock GPIO pins on hardware for code running MicroPython on a device? How do I test PyQt apps? How do I test web scrapers? Is it the best practice to put static html in your test directory or just snippets stored in string variables? What's the best way to to test server client API contracts? How do I test a monitoring tool? We also talk about: What is the Flask testing philosophy? What do Flask tests look like? Flask and Pallets using pytest Code coverage Some of the resulting testing strategies: Set up some preconditions. Run the function. Get the result. Don't test external services. Do test external service failures. Don't test the frameworks you are using. Do test your use of a framework. Use open source projects to learn how something similar to your project tests things. Focus on your code. Focus on testing your new code. Try to architect your application such that actual GUI testing is minimal. Split up a large problem into smaller parts that are easier to test. Nail down as many parts as you can. Special Guest: David Lord.

Exploiting with Teja Kummarikuntla
Michael Kennedy: On Building a Successful Podcast in Technology | Self-employment

Exploiting with Teja Kummarikuntla

Play Episode Listen Later Aug 17, 2020 90:48


What makes a few specific Podcasts impactful in technology?, Michael Kenndy, Founder of Talk Python Training and Host of the number one podcast in Python, Talk Python me. Shared his personal and professional exploits in life and technology that made “Talk Python To Me“ reach millions. Michael spoke about how someone could kickstart a Podcasting in technology and what it takes, sharing his initial situations from quitting his job and getting sponsorships made this conversion transformative. Get 10% off on TalkPython Courses at: talkpython.fm/exploiting Check out his course giveaway from Manning Publications on “Building Data-Driven Web Apps with Flask and SQLAlchemy”, join the challenge at https://linktr.ee/tejakummarikuntla, you can be lucky.

Python Bytes
#183 Need a beautiful database editor? Look to the Bees!

Python Bytes

Play Episode Listen Later May 29, 2020 31:51


Sponsored by DigitalOcean: pythonbytes.fm/digitalocean Special guest: Calvin Hendryx-Parker @calvinhp Brian #1: fastpages: An easy to use blogging platform, with enhanced support for Jupyter Notebooks. Uses GH actions to Jekyll blog posts on GitHub Pages. Create posts with code, output of code, formatted text, directory from Jupyter Notebooks. Altair interactive visualizations Collapsible code cells that can be open or closed by default. Metadata like title, summary, in special markdown cells. twitter cards and YouTube videos tags support Support for pure markdown posts and even MS Word docs for posts. (but really, don’t). Documentation and introduction written in fastpages itself, https://fastpages.fast.ai/ Michael #2: BeeKeeper Studio Open Source SQL Editor and Database Manager Use Beekeeper Studio to query and manage your relational databases, like MySQL, Postgres, SQLite, and SQL Server. Runs on all the things (Windows, Linux, macOS) Features Autocomplete SQL query editor with syntax highlighting Tabbed interface, so you can multitask Sort and filter table data to find just what you need Sensible keyboard-shortcuts Save queries for later Query run-history, so you can find that one query you got working 3 days ago Default dark theme Connect: Alongside normal connections you can encrypt your connection with SSL, or tunnel through SSH. Save a connection password and Beekeeper Studio will make sure to encrypt it to keep it safe. SQL Auto Completion: Built-in editor provides syntax highlighting and auto-complete suggestions for your tables so you can work quickly and easily. Open Lots of Tabs: Open dozens of tabs so you can write multiple queries and tables in tandem without having to switch windows. Save queries View Table Data: Tables get their own tabs too! Use our table view to sort and filter results by column. Calvin #3: 2nd Annual Python Web Conference The most in-depth Python conference for web developers Targeted at production users of Python Talks on Django, Flask, Twisted, Testing, SQLAlchemy, Containers, Deployment and more June 17th-19th — One day of tutorials and two days of talks in 3 tracks Keynote talks by Lorena Mesa Hynek Schlawack Russell Keith-Magee Steve Flanders Fireside Chat with Carl Meyer about Instragram’s infrastructure, best practices Participate in 40+ presentations and 6 tutorials Fun will be had and connections made Virtual cocktails Online gaming Board game night Tickets are $199 and $99 for Students As a bonus, for every Professional ticket purchased, we'll donate a ticket to an attendee in a developing country. As a Python Bytes listener you can get a 20% discount with the code PB20 Brian #4: Mimesis - Fake Data Generator “…helps generate big volumes of fake data for a variety of purposes in a variety of languages.” Custom and generic data providers >33 locales Lots of locale dependent providers, like address, Food, Person, … Locale independent providers. Super fast. Benchmarking with 10k full names was like 60x faster than Faker. Data generation by schema. Very cool >>> from mimesis.schema import Field, Schema >>> _ = Field('en') >>> description = ( ... lambda: { ... 'id': _('uuid'), ... 'name': _('text.word'), ... 'version': _('version', pre_release=True), ... 'timestamp': _('timestamp', posix=False), ... 'owner': { ... 'email': _('person.email', domains=['test.com'], key=str.lower), ... 'token': _('token_hex'), ... 'creator': _('full_name'), ... }, ... } ... ) >>> schema = Schema(schema=description) >>> schema.create(iterations=1) - Output: [ { "owner": { "email": "aisling2032@test.com", "token": "cc8450298958f8b95891d90200f189ef591cf2c27e66e5c8f362f839fcc01370", "creator": "Veronika Dyer" }, "name": "widget", "version": "4.3.1-rc.5", "id": "33abf08a-77fd-1d78-86ae-04d88443d0e0", "timestamp": "2018-07-29T15:25:02Z" } ] Michael #5: Schemathesis A tool for testing your web applications built with Open API / Swagger specifications. Supported specification versions: Swagger 2.0 Open API 3.0.x Built with: hypothesis hypothesis_jsonschema pytest It reads the application schema and generates test cases which will ensure that your application is compliant with its schema. Use: There are two basic ways to use Schemathesis: Command Line Interface Writing tests in Python CLI supports passing options to hypothesis.settings. To speed up the testing process Schemathesis provides -w/--workers option for concurrent test execution If you'd like to test your web app (Flask or AioHTTP for example) then there is --app option for you Schemathesis CLI also available as a docker image Code example: import requests import schemathesis schema = schemathesis.from_uri("http://0.0.0.0:8080/swagger.json") @schema.parametrize() def test_no_server_errors(case): # `requests` will make an appropriate call under the hood response = case.call() # use `call_wsgi` if you used `schemathesis.from_wsgi` # You could use built-in checks case.validate_response(response) # Or assert the response manually assert response.status_code < 500 Calvin #6: Finding secrets by decompiling Python bytecode in public repositories Jesse’s initial research revealed that thousands of GitHub repositories contain secrets hidden inside their bytecode. It has been common practice to store secrets in Python files that are typically ignored such as settings.py, config.py or secrets.py, but this is potentially insecure Includes a nice crash course on Python byte code and cached source This post comes with a small capture-the-flag style lab for you to try out this style of attack yourself. You can find it at https://github.com/veggiedefender/pyc-secret-lab/ Look through your repositories for loose .pyc files, and delete them If you have .pyc files and they contain secrets, then revoke and rotate your secrets Use a standard gitignore to prevent checking in .pyc files Use JSON files or environment variables for configuration Extras: Michael: Python 3.9.0b1 Is Now Available for Testing Python 3.8.3 Is Now Available Ventilators and Python: Some particle physicists put some of their free time to design and build a low-cost ventilator for covid-19 patients for use in hospitals. https://arxiv.org/pdf/2003.10405.pdf Search of the PDF for Python: "Target computing platform: Raspberry Pi 4 (any memory size), chosen as a trade-off between its computing power over power consumption ratio and its wide availability on the market; • Target operating: Raspbian version 2020-02-13; • Target programming language: Python 3.5; • Target PyQt5: version 5.11.3." "The MVM GUI is a Python3 software, written using the PyQt5 toolkit, that allows steering and monitoring the MVM equipment." Brian: Call for Volunteers! Python GitHub Migration Work Group migration from bugs.python.org to GitHub Calvin: Learn Python Humble Bundle Pay $15+ and get an amazing set of Python books to start learning at all levels Book Industry Charitable Foundation The No Starch Press Foundation Joke: More O’Really book covers

Python Bytes
#182 PSF Survey is out!

Python Bytes

Play Episode Listen Later May 19, 2020 25:52


Sponsored by Datadog: pythonbytes.fm/datadog Michael #1: PSF / JetBrains Survey via Jose Nario Let’s talk results: 84% of people who use Python do so as their primary language [unchanged] Other languages: JavaScript (down), Bash (down), HTML (down), C++ (down) Web vs Data Science languages: More C++ / Java / R / C# on Data Science side More SQL / JavaScript / HTML Why do you mainly use Python? 58% work and personal What do you use Python for? Average answers was 3.9 Data analysis [59% / 59% — now vs. last year] Web Development [51% / 55%] ML [40% / 39%] DevOps [39% / 43%] What do you use Python for the most? Web [28% / 29%] Data analysis [18% / 17%] Machine Learning [13% / 11%] Python 3 vs Python 2: 90% Python 3, 10% Python 2 Widest disparity of versions (pro 3) is in data science. Web Frameworks: Flask [48%] Django [44%] Data Science NumPy 63% Pandas 55% Matplotlib 46% Testing pytest 49% unittest 30% none 34% Cloud AWS 55% Google 33% DigitalOcean 22% Heroku 20% Azure 19% How do you run code in the cloud (in the production environment) Containers 47% VMs 46% PAAS 25% Editors PyCharm 33% VS Code 24% Vim 9% tool use version control 90% write tests 80% code linting 80% use type hints 65% code coverage 52% Brian #2: Hypermodern Python Claudio Jolowicz, @cjolowicz An opinionated and fun tour of Python development practices. Chapter 1: Setup Setup a project with pyenv and Poetry, src layout, virtual environments, dependency management, click for CLI, using requests for a REST API. Chapter 2: Testing Unit testing with pytest, using coverage.py, nox for automation, pytest-mock. Plus refactoring, handling exceptions, fakes, end-to-end testing opinions. Chapter 3: Linting Flake8, Black, import-order, bugbear, bandit, Safety. Plus more on managing dependencies, and using pre-commit for git hooks. Chapter 4: Typing mypy and pytype, adding annotations, data validation with Desert & Marshmallow, Typeguard, flake8-annotations, adding checks to test suite Chapter 5: Documentation docstrings, linting docstrings, docstrings in nox sessions and test suites, darglint, xdoctest, Sphinx, reStructuredText, and autodoc Chapter 6: CI/CD CI with GithHub Actions, reporting coverage with Codecov, uploading to PyPI, Release Drafter for release documentation, single-sourcing the package version, using TestPyPI, docs on RTD The series is worth it even for just the artwork. Lots of fun tools to try, lots to learn. Michael #3: Open AI Jukebox via Dan Bader Listen to the songs under “Curated samples.” A neural net that generates music, including rudimentary singing, as raw audio in a variety of genres and artist styles. Code is available on github. Dataset: To train this model, we crawled the web to curate a new dataset of 1.2 million songs (600,000 of which are in English), paired with the corresponding lyrics and metadata from LyricWiki. The top-level transformer is trained on the task of predicting compressed audio tokens. We can provide additional information, such as the artist and genre for each song. Two advantages: first, it reduces the entropy of the audio prediction, so the model is able to achieve better quality in any particular style; second, at generation time, we are able to steer the model to generate in a style of our choosing. Brian #4: The Curious Case of Python's Context Manager Redowan Delowar, @rednafi A quick tour of context managers that goes deeper than most introducitons. Writing custom context managers with __init__, __enter__, __exit__. Using the decorator contextlib.contextmanager Then it gets even more fun Context managers as decorators Nesting contexts within one with statement. Combining context managers into new ones Examples Context managers for SQLAlchemy sessions Context managers for exception handling Persistent parameters across http requests Michael #5: nbstripout via Clément Robert In the latest episode, you praised NBDev for having a git hook that strips out notebook outputs. strip output from Jupyter and IPython notebooks Opens a notebook, strips its output, and writes the outputless version to the original file. Useful mainly as a git filter or pre-commit hook for users who don’t want to track output in VCS. This does mostly the same thing as the Clear All Output command in the notebook UI. Has a nice youtube tutorial right in the pypi listing Just do nbstripout --``install in a git repo! Brian #6: Write ups for The 2020 Python Language Summit Guido talked about this in episode 179 But these write-ups are excellent and really interesting. Should All Strings Become f-strings?, Eric V. Smith Replacing CPython’s Parser with a PEG-based parser, Pablo Galindo, Lysandros Nikolaou, Guido van Rossum A Formal Specification for the (C)Python Virtual Machine, Mark Shannon HPy: a Future-Proof Way of Extending Python?, Antonio Cuni CPython Documentation: The Next 5 Years, Carol Willing, Ned Batchelder Lightning talks (pre-selected) What do you need from pip, PyPI, and packaging?, Sumana Harihareswara A Retrospective on My "Multi-Core Python" Project, Eric Snow The Path Forward for Typing, Guido van Rossum Property-Based Testing for Python Builtins and the Standard Library, Zac Hatfield-Dodds Core Workflow Updates, Mariatta Wijaya CPython on Mobile Platforms, Russell Keith-Magee Wanted to bring this up because Python is a living language and it’s important to pay attention and get involved, or at least pay attention to where Python might be going. Also, another way to get involved is to become a member of the PSF board of directors What’s a PSF board of directors member do? video There are some open seats, Nominations are open until May 31 Extras: Michael: Updated search engine for better result ranking Windel Bouwman wrote a nice little script for speedscope https://github.com/windelbouwman/pyspeedscope (follow up from Austin profiler) Jokes: “Due to social distancing, I wonder how many projects are migrating to UDP and away from TLS to avoid all the handshakes?” - From Sviatoslav Sydorenko “A chef and a vagrant walk into a bar. Within a few seconds, it was identical to the last bar they went to.” - From Benjamin Jones, crediting @lufcraft Understanding both of these jokes is left as an exercise for the reader.

The Real Python Podcast
Python REST APIs and The Well-Grounded Python Developer

The Real Python Podcast

Play Episode Listen Later Apr 24, 2020 54:40


Are you interested in building REST APIs with Flask and SQLAlchemy? This week we have Doug Farrell on the show. We talk about his four-part Real Python article series on Python REST APIs.

Machine learning
Using python and sqlalchemy to extract and transform and load data

Machine learning

Play Episode Listen Later Apr 15, 2020 8:42


Data warehousing is becoming more manageable using python because of metadata access to the database schema

Python Bytes
#176 How python implements super long integers

Python Bytes

Play Episode Listen Later Apr 7, 2020 29:32


Sponsored by DigitalOcean: pythonbytes.fm/digitalocean Topic #0: Quick chat about COVID 19 Brian #1: What the heck is pyproject.toml? Brett Cannon pyproject.toml PEP 517 and 518 define what this file looks like and how to use it to build projects We’re familiar with it being used for flit and poetry based projects. Not so much with setuptools, but it does work with setuptools. You can add configuration for non-build related activities, such as coverage, tox, even though those tools support their own config files. Black is gaining popularity, probably more so than the use of flit. Black only uses pyproject.toml for configuration (what little config is available. But there is some.) So. Project adds use of black, ends up configuring with with pyproject.toml, but not specifying build steps, No builds are broken. :( Brett has the answers. Add the following to pyproject.toml. Then go read the rest of Brett’s article. It’s good. [build-system] requires = ["setuptools >= 40.6.0", "wheel"] build-backend = "setuptools.build_meta" Michael #2: Awesome Python Bytes Awesome List By Jack McKew Will be adding to this repo whenever I hear about awesome packages (in my opinion), PRs are welcome for anyone else though! Already has 5 PRs accepted Comes with graphics!!! Like all good presentations should. Some fun projects this made me recall: Great Expectations - for validating, documenting, and profiling, your data pandas-vet - a plugin for flake8 that provides opinionated linting for pandas code. GeoAlchemy - Using SQLAlchemy with Spatial Databases. vue.py - Provides Python bindings for Vue.js. It uses brython to run Python in the browser. Remember we have speedy search for our content over at pythonbytes.fm/search Brian #3: Publishing package distribution releases using GitHub Actions CI/CD workflows PyPA You’ve moved to flit (or not) and started using GitHub actions to build and test whenever you push to GitHub. So awesome. But now, there’s still a manual step to remember to publish to PyPI. And maybe we should be checking publish more often with the Test PyPI server. This article is a step by step walkthrough. It’s a bit dated, 3.7. So I’m trying to walk through all the steps with my cards project and it will be finished by the time this episode goes live. Stumbling blocks right now: I’ve left my email blank, no email for author or maintainer in pyproject.toml, because neither flit, nor pip require it. But PyPI still does. grrrr. Trying to decide between: normal email, setting up a new email for it, using a me+pypi gmail alias, setting up a new email address just for pypi, etc. test pypi fails due to “file already exists”, so, that’s always gonna be the case unless I bump the version, so gonna have to try to figure out a way around that. Michael #4: Rich text for terminals Rich is a Python library for rich text and beautiful formatting in the terminal. Add colorful text (up to 16.7 million colors) with styles (bold, italic, underline etc.) to your script or application. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, and tracebacks -- out of the box. Centered or justified text Tables, tables! Syntax highlighted code Markdown! Can replace print() and does pretty printing of dictionaries with color. Good Windows support for the new Windows Terminal Brian #5: psutil: Cross-platform lib for process and system monitoring in Python “psutil (process and system utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors) in Python. It is useful mainly for system monitoring, profiling and limiting process resources and management of running processes. It implements many functionalities offered by classic UNIX command line tools such as ps, top, iotop, lsof, netstat, ifconfig, free and others.” Useful for an incredible amount of information about the system you are running on: cpu times, stats, load, number of cores memory size and usage disk partitions, usage sensors, including battery users processes and process management getting ids, names, etc. cpu, memory, connections, files, threads, etc per process signaling processes, like suspend, resume, kill Michael #6: How python implements super long integers by Arpit Bhayani In C, you worry about picking the right data type and qualifiers for your integers; at every step, you need to think if int would suffice or should you go for a long or even higher to a long double. In python, you need not worry about these "trivial" things because python supports integers of arbitrary size. 2 ** 20000 in C is INF where as in Python’s it’s fine, just at 6,021 digit result. But how!?! Integers are represented as: typedef struct { PyObject ob_base; Py_ssize_t ob_size; /* Number of items in variable part */ } PyVarObject; Other types that has PyObject_VAR_HEAD are PyBytesObject PyTupleObject PyListObject # Python's number: struct _longobject { PyObject ob_base; Py_ssize_t ob_size; /* Number of items in variable part */ digit ob_digit[1]; }; A "digit" is base 230 hence if you convert 1152921504606846976 into base 230 you get 100 Operations on super long integers Addition: Integers are persisted "digit-wise", this means the addition is as simple as what we learned in the grade school Subtraction: Same Multiplication: In order to keep things efficient implements the Karatsuba algorithm that multiplies two n-digit numbers in O(nlog23) elementary steps. Optimization of commonly-used integers: Python preallocates small integers in a range of -5 to 256. This allocation happens during initialization Extras: Michael: We're coming to YouTube, probably. :) npm is joining GitHub Joke:

Python Bytes
#174 Happy developers use Python 3

Python Bytes

Play Episode Listen Later Mar 26, 2020 47:44


Sponsored by us! Talk Python courses & pytest book. Topic #0: Quick chat about COVID 19. Brian #1: Documentation as a way to build Community Melissa Mendonça “… educational materials can have a huge impact and effectively bring people into the community.” Quality documentation for OSS is often lacking due to: decentralized development documentation is not as glamorous or as praised as new features or major bug fixes “Even when the community is welcoming, documentation is often seen as a "good first issue", meaning that the docs end up being written by the least experienced contributors in the community.” Possible solution: organize/re-organize docs into: tutorials how-tos reference guide explanations consequences: Improving on the quality and discoverability Clear difference between docs aimed at different users Give users more opportunities to contribute, generating content that can be shared directly on the official documentation Building a documentation team as a first-class team in the project, which helps create an explicit role as documentation creator. This helps people better identify how they can contribute beyond code. Diversifying our contributor base, allowing people from different levels of expertise and different life experiences to contribute. This is also extremely important so that we have a better understanding of our community and can be accessible, unbiased and welcoming to all people. Referenced in article: "What nobody tells you about documentation" Michael #2: The Django Speed Handbook: making a Django app faster By Shibel Mansour Speed of your app is very important: 100ms is an eternity. SEO, user conversions, bounce rates, etc. Use the tried-and-true django-debug-toolbar. Analyze your request/response cycles and see where most of the time is spent. Provides database query execution times and provides a nice SQL EXPLAIN in a separate pane that appears in the browser. ORM/Database: Two ORM functionalities I want to mention first: these are select_related and prefetch_related. Nice 24x perf improvement example in the article. Basically, beware of the N+1 problem. Indexes: Be sure to add them but they slow writes. Pagination: Use it if you have lots of data Async / background tasks. Content size: Shrunk 9x by adding gzip middleware Static files: minify and bundle as you can, cache, serve through nginx, etc. At Python Bytes, Talk Python, etc, we use webassets, cssmin, and jsmin. PageSpeed from Google, talk python’s ranking. ImageOptim (for macOS, others) Lazy-loading images: Lazily loading images means that we only request them when or a little before they enter the client’s (user’s) viewport. With excellent, dependency-free JavaScript libraries like LazyLoad, there really isn’t an excuse to not lazy-load images. Moreover, Google Chrome natively supports the lazy attribute. Remember: Test and measure everything, before and after. Brian #3: dacite: simplifies creation of data classes from dictionaries Konrad Hałas dataclasses are awesome quick and easy fields can have default values be excluded from comparison and/or repr and more data often gets to us in dictionaries Converting from dict to dataclass is trivial for trivial cases: x = MyClass(**data_as_dict) For more complicated conversions, you need dacite dacite.from_dict supports: nested structures optional fields and unions collections type_hooks, which allow you to have custom converters for certain types strict mode. Normally allows extra input data that is just ignored if it doesn’t match up with fields. But you can use strict to not allow that. Raises exceptions when something weird happens, like the wrong type, missing values, etc. Michael #4: How we retired Python 2 and improved developer happiness By Barry Warsaw The Python Clock is at 0:00. In 2018, LinkedIn embarked on a multi-quarter effort to fully transition to a Python 3 code base. In total, the effort entailed the migration of about 550 code repositories. They don't use Python in our product or as a monolithic web service, and instead have hundreds of independent microservices and tools, and dozens of supporting libraries, all owned by independent teams in separate repositories. In the early days, most of internal libraries were ported to be “bilingual,” meaning they could be used in either Python 2 or 3. Given that the migration affected all of LinkedIn engineering across so many disparate teams and thousands of engineers, the effort was overseen by our Horizontal Initiatives (HI) program. Phase 1: In the first quarter of 2019, we performed detailed dependency graphing, identifying a number of repositories that were more foundational, and thus needed to be fully ported first because they blocked the ports of everything that depended on them. Phase 2: In the second quarter of 2019, we identified the remainder of repositories that needed porting Post-migration reflections: Our primary indicator for completing the migration of a multiproduct was that it built successfully and passed its unit and integration tests. For other organizations planning or in the midst of their own migration paths, we offer the following guidelines: Plan early, and engage your organization’s Python experts. Find and leverage champions in your affected teams, and promote the benefits of Python 3. Adopt the bilingual approach to supporting libraries so that consumers of your libraries can port to Python 3 on their own schedules. Invest in tests and code coverage—these will be your best success metrics. Ensure that your data models are explicit and clear, especially in identifying which data are bytes and which are human-readable text. Benefits: No longer have to worry about supporting Python 2 and have seen our support loads decrease. Can now depend on the latest open source libraries and tools, and free from the constrictions of having to write bilingual Python. Opportunistically and enthusiastically adopting type hinting and the mypy type checker, improving the overall quality, craft, and readability of Python code bases. Brian #5: The Troublesome Active Record Pattern Cal Paterson "Object relational mappers" (ORMs) exist to bridge the gap between the programmers' friend (the object), and the database's primitive (the relation). Examples include Django ORM and SQLAlchemy The Active Record pattern of data access is marked by: A whole-object basis Access by key (mostly primary key) Problem: Queries that don’t need all information for objects retrieve it all anyway, and it’s easy to code for loops to select or collect info that are wildly inefficient. how many books are there how many books about software testing written by Oregon authors Problem: transactions. people can forget to use transactions, some ORMs don’t support them, they are not taught in beginner tutorials, etc. SQLAlchemy has sessions Django has atomic() REST APIs can suffer the same problems. Solutions: just use SQL first class queries first class transactions avoid Active Record style access patterns Be careful with REST APIs Alternatives: GraphQL RPC-style APIs Michael #6: Types at the edges in Python By Steve Brazier For a new web service in python there are 3 things to start with: Pydantic mypy Production error tracking of some kind Why: Because what is this about? AttributeError: 'NoneType' object has no attribute 'strip' It should be: none is not an allowed value (type=type_error.none.not_allowed) We then launch this code into production and our assumptions are tested against reality. If we’re lucky our assumptions turn out to be correct. If not we likely encounter some cryptic NoneType errors like the one at the start of this post. Pydantic can help by formalizing our assumptions. mypy carries on helping: Once you see the error at the start of this post (thanks error reporting) you know what is wrong about assumptions. Make the following change to your code: field: typing.Optional[str] BTW: FastAPI integrates with Pydantic out of the box. A mini-kata like exercise here that can be worked through: meadsteve/types-at-the-edges-minikata Extras: Michael: Python Bytes Awesome Package List by Jack Mckew Visual Basic Will Stall Out With .NET 5 COVID 19 data sets New course in dev: Adding a CMS to Your Data-Driven Web App [in Pyramid|Flask] Joke:

tryexceptpass
Episode 3 - Decoupling Database Migrations at Application Startup

tryexceptpass

Play Episode Listen Later Feb 9, 2020 13:23


Data models change and evolve with your application. There’s plenty of tools that keep track of database schemas and automatically generate scripts to upgrade or downgrade them. It’s common for developers to run a migration at the start of their app before running app code. Our author explains two common problems with this approach. Modern day production deployments and horizontal scaling can get you into a race condition. You start assuming that new code will only ever run with the new schema. You can decouple migrations from code changes by disabling parallelism during this time. Make it a separate command or lock the database during the upgrade. We can easily implement locking ourselves in any language. Use Redis locks if you’re ok with something external to the DB. Use the DB itself by writing to an extra table to say that you’re upgrading it. Plan your deployment appropriately so you can run old code with new by making migrations additive in the short term. Using a script at startup that optionally performs the migration based on an environment variable integrates wel with Docker and cloud services. Upgrades of both code and data should be part of your testing BEFORE releasing to production.

tryexceptpass
Episode 1 - Practicality: ORMs vs SQL

tryexceptpass

Play Episode Listen Later Jan 12, 2020 16:09


It’s up to us to learn how to apply design patterns and industry trends to our projects. What’s an Object Relational Mapper (ORM)? Why do I want to use one? Unexpected quirks of using ORMs. What are the tradeoffs? What about scalability?

Podcast proConf
proConf #8 PyConBY 2019

Podcast proConf

Play Episode Listen Later Apr 8, 2019 107:21


proConf #8 PyConBY 2019 Таймкоды: 00:00 - Приветствие и о госте 04:21 - Alejandro Saucedo, A practical guide towards explainability and bias evaluation in ML - https://youtu.be/rq95qznOZKw 14:40 - Yuriy Guts, Teaching Computers to Play Games with Reinforcement Learning - https://youtu.be/ALRf2hBKydQ 26:49 - Nikita Grishko, Evolution of dependency management - https://youtu.be/YErAfIWC0wk 33:41 - Ewa Jodlowska, Destination Python - https://youtu.be/1YEbIf444Kc 43:42 - Anna Veronika Dorogush, CatBoost: gradient boosting for classification, regression, ranking - https://youtu.be/xgrUdncj1b4 51:50 - Hynek Schlawack, How to write deployment-friendly applications - https://youtu.be/uCKSaYKadEg 56:39 - Tania Allard, Jupyter Notebooks: Friends or Foes? - https://youtu.be/vyAG0bPJ6Es 01:05:29 - Kirill Borisov, Taming the beast: tests, legacy and You - https://youtu.be/_Uce6OKb0PM 01:13:13 - Elena Nikolaichik, MQTT with Python - https://youtu.be/I3AllyGbclU 01:17:56 - Lasse Schuirmann, How to Launch your Idea Within 30 Days - https://youtu.be/Dvi2R04yHNA 01:26:30 - Oleksandr Tarasenko, How to grow GraphQL and remove SqlAlchemy&REST API - https://youtu.be/U7FoRt5dTYE 01:33:49 - Martin Christen,Geospatial Data Processing, Analysis and Visualization using Python - https://youtu.be/SXW_b_lZRtU 01:37:24 - Artem Seleznev, The right way of your data visualization - https://youtu.be/o4RRRF2AWdc 01:39:14 - Data pipelines with Stairs, Олег Шидловский - https://youtu.be/YH6kzldOAY8 01:45:47 - Впечатления и итоги.

IT Career Energizer
You Need To Get Comfortable With Being Uncomfortable with Matt Harrison

IT Career Energizer

Play Episode Listen Later Apr 2, 2019 23:22


GUEST BIO: My guest on today’s show is Matt Harrison.  Matt is an instructor on Python and Data Science material.  He has been co-chair of the Utah Python user group and has presented at conferences including PyCon, OSCon and OpenWest.  Matt is also an author of a number of books about Python, including the Treading on Python Series.   EPISODE DESCRIPTION: Matt Harrison is Phil’s guest on today’s show. He is a Python and Data Science Consultant who offers customized training to corporations and startups as well as consulting services through his company MetaSnake. Over the years, he has worked with a range of languages and platforms, including Pandas, Pylons, Django, CherryPy, Postgres, AWS, SQLAlchemy, SciKit Learn, and Matplotlib. Matt was the co-chair of the Utah Python user group as well as an author and public speaker. In 2012, he published his first Python book Treading on Python Volume 1: Foundations of Python. Since then, he has published several other books and is currently busy writing more. KEY TAKEAWAYS: (1.02) – So Matt, can I ask you to expand on that brief intro and tell us a little bit more about yourself? Matt explains that he runs a small consulting and training company called MetaSnake. He works with businesses big and small and spends half his time speaking to very technical people teaching them Python and data science. Right now, he is working on three more books. (2.09) – Python is quite a theme, in your career, what made you choose that, in particular? The first language Matt learned was Perl. He used it for his first summer job, so became very comfortable with it.   Matt was lucky enough to work with a really smart guy. At the time, he was building on a model to pull out relevant terms for their corpus of text. The guy he was working with wanted to use Tcl to get the task done and Matt thought Perl would do a better job. So, they agreed to meet in the middle and use Python instead. At that time, it was a relatively new language. Within 3 days they had the proof of concept working. Python just gelled with him, unlike, Perl, C and Java, which he had mostly been using up to that point. (3.42) – Phil asks Matt to tell the audience more about his books, which Phil understands are mainly about Python. Matt explains that his book “Illustrated guide to Python 3” is for beginners. He has also written an intermediate book, one that covers the Pandas library and a few others. All of which are available on Amazon. (4.14) – Can you please share a unique career tip with the I.T. career audience? Matt says his advice is to – get comfortable with being uncomfortable. When he was just starting out, his local Python meetup took place a couple of miles away from where he lived. But, he didn’t attend partly because it would take him outside of his comfort zone. A decision he regrets to this day. At the time, it was a very tight-knit group. Not attending meant that he ended up missing out on a lot of important interactions. Plus, he eventually ended up meeting everyone anyway. At the time he did not understand the power of interacting with others. If you want to further your career, you need to get away from your computer sometimes and mix with other people. (6.00) – Can you tell us about your worst career moment? And what you learned from that experience. For Matt that was when he started his small vertical niche software company. A lot of firms let them liked the software. But very few of them decided to buy. In a surprising number of cases, this was because using the software would mean they would have to fire someone. A lot of the firms were small and employed family members, so they really did not want a piece of software to replace them. When Matt heard this he just said OK and moved on instead of trying another sales tactic. He knew he had a good product, but his lack of sales skills meant he could not close the deal. (8.20) – What was your best career moment? For Matt, that was when he wrote his first book in 2010. He wanted to reach more people with his training and realized he could do that as an author. His self-published book was a great success and opened a lot of doors for him. (10.00) – Phil asks if the process of writing books gets easier. Matt says yes, to a certain extent it does. Things do move faster once you have created a process that works for you. He now finds it easier to start typing and get in the flow. (10.59) – Can you tell us what excites you about the future of the IT industry and careers? The fact that a lot of companies are now waking up to the power of their data is exciting. There is a lot of low hanging fruit. As a result, you can make a huge difference and do so very quickly. (12.14) – What first attracted you to a career in IT? Matt always enjoyed creating things. When he was younger, he attended a lot of art classes and thought he might end up being an artist. But, a family member encouraged him to take a programming course. Once he did, he realized that there is a lot of creativity involved in most areas of technology, including in the data science field. (13.23) – What is the best career advice you have ever received? Matt says that he actually ignored the best piece of career advice he got. In 2004, he was advised to get a job at Google, but he didn’t. Fortunately, he did follow another great piece of advice, when he was told you need to network, he started doing exactly that. It is hard for a lot of programmers to network, because, by nature, many of them are introverts. In the IT world, you usually get good jobs, not because you interviewed well, but, because someone in the company knows you. So, learning to network is something everyone has to do. (14.33) – Phil points out that effective networking does not always have to happen face to face. There are plenty of online tools you can also use. Matt says that personally, he prefers face to face networking. However, he has seen people using Twitter and LinkedIn for job hunting. In fact, he tried it once and was contacted by about 40 people, so it can work. (15.43) – If you were to begin your IT career again, right now, what would you do? Matt is intrigued by the idea of taking the full-time, online immersive Computer Science courses offered by the Lambda School. They do not charge for their courses, at least not at first. Instead, you pay for your tuition once you get a job. Although, he goes on to say that he enjoyed his college experience. So, if he were to start again, he would probably still opt to attend Stanford and get a degree. His advice to someone who is just starting out would be to go and get a job at Google or somewhere similar. Work for a big company for a few years. Build up your connections and involve yourself in the community. Having a firm like Google on your resume is still something of a golden ticket. (18.40) – What are you currently focusing on in your career? For this year, Matt’s focus is growing MetaSnake. He really enjoys spending three or four days with a group of people who are motivated and excited to learn, so wants more clients. (19.53) – What is the number one non-technical skill that has helped you the most in your IT career? Matt likes to think of himself as creative. Fortunately, when it comes to machine learning and data exploration creativity is a great skill to have. (20.31) – Phil asks Matt to share a final piece of career advice with the I.T. Career Energizer audience. Matt’s advice is to look at where you are now. Then think about where you want to be a year and five years down the line. Ask yourself what you want to achieve. It could be publishing a book, speaking at conferences, or something else. Matt has found that desire and motivation have helped him to move his career forward. BEST MOMENTS: (4.30) MATT – "Get comfortable with being uncomfortable." (5.16) MATT – "The more I network and connect with people the more value I can bring to them and the more value they can bring to me." (11.46) MATT – "There is a lot of low hanging fruit that companies can take advantage of.” (13.51) MATT – "The best career advice I have seen is to network" (20.42) MATT – "Look hard at where you are and know where you want to be." CONTACT MATT: Twitter: https://twitter.com/__mharrison__ LinkedIn: https://www.linkedin.com/in/panela/ Website: https://www.metasnake.com/

Python Podcast
PP05 - Datenbanken

Python Podcast

Play Episode Listen Later Feb 24, 2019 190:46


Wir haben uns diesmal zum Thema Datenbanken und Python zusammen gesetzt. Datenbanken sind ein weites Feld und daher ist diese Sendung auch ein bisschen länger geworden. Shownotes Datenbanken Postgres MySQL MariaDB MongoDB CouchDB Dgraph Neo4j Redis InfluxDB TimescaleDB Lucene Solr Elastichsearch Python ORM Django SQLAlchemy Pony peewee "Big Data" Ibis Arrow pyspark Papers A Relational Model of Data for Large Shared Data Banks C-Store: A Column-oriented DBMS Picks Sqlite Datasette Async binary driver for postgres Pickle Quellen Data serialization formats Taking a tour of postgres Everything is miscellaneous Method Chaining Implementing faceted search with Django and PostgreSQL Data Warehousing for Cavemen

/dev/hell
Episode 72: Hermits and Horses

/dev/hell

Play Episode Listen Later Feb 26, 2016


Jason Myers came on the show to talk about his experiences running not one but TWO conferences in the Nashville, Tennessee area, along with how he ended up writing a book about a popular Python database abstraction tool, and why he prefers the hermetic lifestyle. Along the way Chris and Jason also managed to beat a dead horse for a few minutes. Special offer for listeners! Get 50% off Backup Pro’s CMS plugins by using the promo code devhell! And get trials of Backup Pro for ExpressionEngine 2, ExpressionEngine 3, Craft, WordPress, PrestaShop, and Concrete5! Also! Listeners can get a 50% discount on Jason Myers' book Essential SQLAlchemy, 2nd Edition! Discount will show when you add it to your cart. Go buy it now! Do these things! Check out our sponsors Backup Pro and WonderNetwork Buy stickers at devhell.info/shop Follow us on Twitter here Rate us on iTunes here Listen Download now (MP3, 68.4MB, 1:35:57) Links and Notes Jason on Twitter Jason’s book on SQLAlchemy PyTennessee Nodevember PyGotham PyOhio Adam Culp’s write-up about SunshinePHP and CoC violations Maus PHP Conference Australia The Combine Kalamazoo X OSMIHelp

Lococast.net
Lococast.net Episode 21: OLF recap and there will be rants!

Lococast.net

Play Episode Listen Later Sep 20, 2011


Episode 21: OLF recap and there will be rants! Intro Events - [1DevDayDetroit Nov 4/5th](# "1DevDayDetroit") OhioLinuxfest Recap: Thanks for stopping by the booth everyone! [Sourceforge](http://sourceforge.net) Interview - [Elizabeth Naramore](http://www.naramore.net/blog/), Community Developer Manager Links of the week - [A Gnome OS? Would you use it?](http://bobthegnome.blogspot.com/2011/09/gnome-os.html) - [Ubuntu with a rolling monthy release, what might work/what will fail](http://arstechnica.com/open-source/news/2011/09/ubuntu-technical-board-member-proposes-monthly-ubuntu-release-cycle.ars) - [Mark Shuttleworth on Cloud APIs are like HTTP, don't screw it up.](http://www.markshuttleworth.com/archives/765) - [Application design, Launchpad thinks smaller services](https://dev.launchpad.net/ArchitectureGuide/Services) Rick's Mini Rant: Your anti pattern is called a tool - [Original Article: ORM is an anti-patter](http://seldo.com/weblog/2011/08/11/orm_is_an_antipattern) - [SqlAlchemy](http://sqlalchemy.org) Books - Rick: [Different: Escaping the Competitive Herd](http://www.amazon.com/gp/product/B0036S4CNE/ref=as_li_ss_tl?ie=UTF8&tag=mitechie-20&linkCode=as2&camp=217145&creative=399373&creativeASIN=B0036S4CNE) - Craig: [Mouse Guard](http://mouseguard.net) by David Petersen Music - [Горсти талого снега by Калевала from Кукушкины дети](http://www.jamendo.com/en/album/94940) - [Human Core by HiHate from Against All](http://www.jamendo.com/en/album/97774) - [Natural 20s by Dual Core from Next Level](http://dualcoremusic.com/nerdcore/) - [Eighties Dance Music by The West Exit from Unearthed](http://magnatune.com/artists/albums/westexit-unearthed/) - [Imported by Irate Architect from Visitors](http://www.jamendo.com/en/album/80765) - [The Four Seasons: Concerto in E Major, Op. 8/1, RV 269 - 'Spring': III. Allegro by Lara St. John from Vivaldi - The Four Seasons](http://magnatune.com/artists/albums/lara-fourseasons/) - [Never Happy by Drop Alive from Drop Alive](http://www.jamendo.com/en/album/6357)

techzing tech podcast
140: TZ Discussion - Back on Track

techzing tech podcast

Play Episode Listen Later Aug 1, 2011 93:11


Justin ans Jason discuss Steve Perlman's impossible wireless tech known as DIDO and the technology of WiTricity, why Pluggio's growth has suddenly stalled out, logging slow queries using MySQL's Slow Query Log and monitoring your site using SiteUptime, Jason and Curtis's upcoming post on Uber's Node.js based dispatching system, the designer they've hired to create AnyFu's brand identity and UI and whether they should use Braintree or PayPal for payment processing, how Jason tried and abandoned jScrollPane to build his own custom scrollbar, Justin's new Juice diet and the movie that inspired it, the sophistication and complexity of SQLAlchemy and Doctrine and the ORM Jason is building for Appignite, the Airbnb fiasco and some ideas on how they could mitigate that kind problem in the future and the industrial scale patent trolling of Intellectual Ventures.