ZeroRPC is a light-weight, reliable and language-agnostic library for distributed communication between server-side processes. It builds on top of ZeroMQ and MessagePack. Support for streamed responses – similar to python generators – makes ZeroRPC more than a typical RPC engine. Built-in heartbeats and timeouts detect and recover from failed requests. Introspective capabilities, first-class exceptions and the command-line utility make debugging easy. ZeroRPC powers the infrastructure behind dotCloud.
Tag: python
Sourcegraph: Search source, documentation, and usage examples in open source projects
It’s Dangerous: Python crypto library for signing data before sending through untrusted environments
(via)
“Various helpers to pass data to untrusted environments and to get it back safe and sound.”
Example Use Cases
- You can serialize and sign a user ID for unsubscribing of newsletters into URLs.
This way you don’t need to generate one-time tokens and store them in the database.
Same thing with any kind of activation link for accounts and similar things.- Signed objects can be stored in cookies or other untrusted sources which means you don’t need to have sessions stored on the server,
which reduces the number of necessary database queries.- Signed information can safely do a roundtrip between server and client in general which makes them useful for passing server-side state
to a client and then back.
Gilliam: Micro-services framework built on Docker, written in Python
I like the idea of micro services. It feels very Unix-y to me. This project is full of buzzword goodness: Docker, REST, JSON, event-driven IO… If only they had worked Git in somehow!
From the Gilliam website:
Gilliam is a open source Platform as a Service (PaaS) that allows you easily develop, deploy and scale your application backend. Unlike commercial
and many other open source PaaS systems, Gilliams is intended for Micro Service Architectures.Gilliam stands on the sholders of Docker. Every piece of code running on Gilliam is a Docker image. To that Gilliam adds service discovery, a router,
scheduling and elastic scaling.
boto: Python interface to Amazon Web Services
Looks like a lovely API. The docs look pretty good. I love me some good docs!
From the boto Github page:
Boto is a Python package that provides interfaces to Amazon Web Services.
At the moment, boto supports:
- Compute
- Amazon Elastic Compute Cloud (EC2)
- Amazon Elastic Map Reduce (EMR)
- AutoScaling
- Amazon Kinesis
- Content Delivery
- Amazon CloudFront
- Database
- Amazon Relational Data Service (RDS)
- Amazon DynamoDB
- Amazon SimpleDB
- Amazon ElastiCache
- Amazon Redshift
- Deployment and Management
- AWS Elastic Beanstalk
- AWS CloudFormation
- AWS Data Pipeline
- AWS Opsworks
- AWS CloudTrail
- Identity & Access
- AWS Identity and Access Management (IAM)
- Application Services
- Amazon CloudSearch
- Amazon Elastic Transcoder
- Amazon Simple Workflow Service (SWF)
- Amazon Simple Queue Service (SQS)
- Amazon Simple Notification Server (SNS)
- Amazon Simple Email Service (SES)
- Monitoring
- Amazon CloudWatch
- Networking
- Amazon Route53
- Amazon Virtual Private Cloud (VPC)
- Elastic Load Balancing (ELB)
- AWS Direct Connect
- Payments and Billing
- Amazon Flexible Payment Service (FPS)
- Storage
- Amazon Simple Storage Service (S3)
- Amazon Glacier
- Amazon Elastic Block Store (EBS)
- Google Cloud Storage
- Workforce
- Amazon Mechanical Turk
- Other
- Marketplace Web Services
- AWS Support
Beets: Extendable command-line tool & library for cataloging, manipulating, & accessing your music library written in Python
Example:
$ beet import ~/music/ladytron
Tagging:
Ladytron - Witching Hour
(Similarity: 98.4%)
* Last One Standing -> The Last One Standing
* Beauty -> Beauty*2
* White Light Generation -> Whitelightgenerator
* All the Way -> All the Way...
From the Beets Github page
- Fetch or calculate all the metadata you could possibly need: album art, lyrics,
genres, tempos, ReplayGain levels, or acoustic fingerprints.- Get metadata from MusicBrainz, Discogs, or Beatport. Or guess metadata using
songs’ filenames or their acoustic fingerprints.- Transcode audio to any format you like.
- Check your library for duplicate tracks and albums or for albums that are missing tracks.
- Clean up crufty tags left behind by other, less-awesome tools.
- Embed and extract album art from files’ metadata.
- Browse your music library graphically through a Web browser and play it in
any browser that supports HTML5 Audio.- Analyze music files’ metadata from the command line.
- Listen to your library with a music player that speaks the MPD protocol and
works with a staggering variety of interfaces.- If beets doesn’t do what you want yet, writing your own plugin is shockingly
simple if you know a little Python.
zerorpc: Python RPC implementation based on zeromq and messagepack
https://github.com/dotcloud/zerorpc-python
zerorpc is a flexible RPC implementation based on zeromq and messagepack.
Service APIs exposed with zerorpc are called “zeroservices”.zerorpc can be used programmatically or from the command-line. It comes with a
convenient script, “zerorpc”, allowing to:
- expose Python modules without modifying a single line of code,
- call those modules remotely through the command line.
It looks like it used gevent for concurrency.
MkDocs: Markdown-based static site generator written in Python meant for building documentation
Sphinx: A powerful documentation creation tool written in Python that uses the reStructuredText markup language
According to the website, Sphinx…
…has excellent facilities for the documentation of Python projects, but C/C++ is already supported as well, and it is planned to add special
support for other languages as well.”
Sphinx outputs in the following formats…
HTML (including Windows HTML Help), LaTeX (for printable PDF versions), ePub, Texinfo, manual pages, plain text
SQLAlchemy: Python SQL Toolkit and Object Relational Mapper
SQLAlchemy looks cool enough to make me go hunting for a Java equivalent for use on projects at work.
Take a look at the features page. I’m particularly interested in the Unit Of Work…
The Unit Of Work system, a central part of SQLAlchemy’s Object Relational Mapper (ORM), organizes pending insert/update/delete operations into
queues and flushes them all in one batch. To accomplish this it performs a topological “dependency sort” of all modified items in the queue so as
to honor inter-row dependencies, and groups redundant statements together where they can sometimes be batched even further. This produces the
maximum efficiency and transaction safety, and minimizes chances of deadlocks. Modeled after Fowler’s “Unit of Work” pattern as well as
Hibernate, Java’s leading object-relational mapper.
…and Raw SQL statement mapping…
SQLA’s object relational query facilities can accommodate raw SQL statements as well as plain result sets, and object instances can be generated
from these results in the same manner as any other ORM operation. Any hyper-optimized query that you or your DBA can cook up, you can run in
SQLAlchemy, and as long as it returns the expected columns within a rowset, you can get your objects from it. Statements which represent multiple
kinds of objects can be used as well, with results received as named-tuples, or with dependent objects routed into collections on parent objects.
SQLAlchemy supports…
…dialects for SQLite, Postgresql, MySQL, Oracle, MS-SQL, Firebird, Sybase and others, most of which support multiple DBAPIs. Other dialects are
published as external projects. The corresponding DB-API 2.0 implementation (or sometimes one of several available) is required to use each
particular database. View Current DBAPI Support.
Bruce Eckel is a Java guy I respect. He wrote Thinking in Java and he said this about SQLAlchemy:
SQLAlchemy is a pretty amazing design…In SQLAlchemy, you need to explicitly start a session. What’s amazing is that all the changes you make
during that session are kept in some kind of parse tree, and then when the session ends SQL is created on-the-fly to produce a single, optimal
SQL statement for that particular sequence of changes. I found this idea pretty mind-blowing.
That sounds pretty sexy to me.