How To Finish What You Start

In my post yesterday I talked about how we tend to be great at planning things, but not so good at doing the things we had planned. “Simple? you say. There is nothing simple about dreaming, and…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




5 Python Libraries We Love

Nylas is a Python shop, and while we use a lot of the Python libraries you’d expect to see in an email API codebase, like datetime, imaplib, and xml parsers, we also use a ton of open-source Python tools outside the standard library. These crucial libraries have saved us from reinventing the wheel time and time again, and we’ve gotten a lot of mileage out of them.

Here are 5 of our favorite Python libraries, and how we use them:

When you’re running as many services as we do (a sync service, an API, a developer dashboard, and a webhooks service, to name a few!), with hundreds of customers all using your platform in unique ways, and a database distributed across 200 shards, iterating on interconnected systems and debugging issues becomes a complex problem.

And just for fun, we made it pretty:

After the initial response has been recorded, it is “replayed” by later tests, so we don’t have to make live requests to external APIs in our test code. This makes our tests fast (no real HTTP requests anymore), deterministic (the test will continue to pass, even if you are offline) and accurate (the response will contain the same headers and body you get from a real request).

We have a ton of data in our databases, and caching the results of queries we know are executed frequently lets us serve up faster results, with less load on the database. To prevent the cache from getting too big, which impacts performance, we like to cap the size, and it’s convenient to set an expiration date on the data, so that our cache doesn’t get stale.

Add a comment

Related posts:

Entering the Blockchain

Blockchain is the most current, high-voltage, talked-about tech of the world! May be so due to the huge economic and financial tag that comes with it. Interestingly though, one of the things that we…

Peppermint Fudge Balls

Chocolate and peppermint seem to be a leading couple of the Christmas candy season and for good reason! It is a delicious combination! 1 cup almond butter 1 cup coconut oil, at room temperature 1/2…

The Many Ways the Cleveland Cavaliers Failed LeBron James 1.0

I am nostalgic for the 2003–10 Cleveland Cavaliers, and I do not understand why. Five trips to the postseason, the team never won one NBA Finals game. They underachieved, considering they employed…