We'll need to share your messages (and your email address if you're logged in) with our live chat provider, Drift. Here's their privacy policy.
If you don't want to do this, you can email us instead at contact@anvil.works.
It’s been another monster month for us.
It was great meeting everyone at PyCon, and the crowds around our table were awesome! Check out my 5-minute talk from the conference: Making the Web More Pythonic
As always, we’re improving Anvil all the time. Here are a few things you might have missed:
1. Beautiful apps: New Material Design theme
We’ve published a new Material Design theme! We’ve given our components a facelift and added swappable colour schemes, so it’s now even easier to build beautiful apps.
(Don’t worry, the old theme is still there - it’s now called “Classic”.)
2. Simple objects in Data Tables
If you want to store richer data, you can now add “Simple Object” columns to your Data Tables. These can store strings, numbers, lists, or dicts - that’s any JSON object. And you can search inside them with a powerful query system.
Find out more on our blog: https://anvil.works/blog/simple-object-storage
3. Looking after the details
Here are some things we’ve done this month to make Anvil even more pleasing to use:
Easier code navigation - you can hold down the Ctrl key and click on a function or variable to jump to its definition.
The new FlowPanel lets you lay out components side-to-side. It’s great for grouping buttons, links or labels right next to each other.
We’ve made it easier to drag and drop Link components, so it’s clearer whether you’re dropping something next to a Link or inside it. (I love this when I’m building sidebars for navigation!)
More options for displaying images in Image components: Shrink to fit, zoom to fill, or display your image at its original size no matter how big your page is.
Want your components closer together, or further apart? Now you can control the spacing in a ColumnPanel with the column_spacing
property.
We’ve made the Toolbox easier to navigate by highlighting the most commonly used components.
Fixed-width layouts are easier now too, with the XYPanel. Most of the time, you won’t be needing a fixed-width layout, but when you do, it’s right there.
Happy building!
Meredydd
The Web is traditionally a pain to program. It's also seriously un-Pythonic.
At PyCon 2018, I asked: Can we make Web programming easier, by making it more Python-shaped?
Scroll down for transcriptDo you find yourself wanting to store more than just strings, numbers and dates in your tables? Perhaps you have complex records with dynamic fields, or perhaps you want to store lists of data without making a whole new table.
Today, we’re introducing a new type of column: the Simple Object. It can store lists, dicts, numbers, strings and (of course) None
. (If you’re familiar with JSON, you’ll know this is another way of saying “any JSON value”.)
Add a Simple Object column to your table like this:
Now you can store structured data in a single row of your table:
app_tables.people.add_row(
name = "Kermit the Frog",
contact_details = {
'phone': [
{'type': 'work',
'number': '555-555-5555'},
{'type': 'home',
'number': '555-123-4567'}
]
})
Querying them is just as simple. If you supply an object to the Data Tables search()
or get()
method, you’ll match every value that contains those values, dictionary keys or list items. Here’s an example:
def get_person_for_number(phone_number):
# We have a phone call for this number. Who is it?
return app_tables.people.get(
contact_details = {'phone': [{'number': phone_number}]}
)
You can read more about Simple Object columns in the Data Tables reference docs.
Hi everyone,
A lot has happened in Anvil in the last month, here are the highlights:
1. Building Y Combinator Startups in Anvil
How fast can you build a startup? We built full, working versions of two startups from the famous incubator - in just an hour or two each. See how easily you can build a startup with Anvil:
2. New Learning Centre
We’ve reorganised the Anvil documentation, and added a bunch of new how-to guides to our “Cookbook” section. Did you know…
Find all these and more at anvil.works/learn.
3. Do more with Anvil
We’re always making Anvil better. Here are some little improvements you might not have seen:
We’ve made it even easier to download files from your Anvil app. You can set the url
property of a Link component to any Media object, even a temporary one.
Two-factor authentication - secure your access to the Anvil IDE by enabling two-factor auth on your account today. (Open the Anvil editor and choose My Account)
The Client Uplink lets you connect un-trusted code to your Anvil apps, just like the Uplink. Building the Internet of Things just got easier! (Read the docs)
Customise your Stripe credit card form - you can now set an icon_url
with anvil.stripe.checkout()
4. Show and Tell in the Anvil forums
See what other people have built, and share your own apps, in the Anvil forums. Ask questions, get help, and get inspired.
I look forward to seeing you there!
It’s Y Combinator’s week of Demo Days, and we’re prototyping one YC startup each day. (If you missed it, check out the first in this series, where we prototyped an e-parking service in an hour and a half.)
Magic (YC W15) is an SMS concierge that can do anything. Text them a request, however outlandish, and they will make it happen. Let’s put ourselves into the founders’ shoes, when they were just starting out. We don’t know if anyone wants this service, so we need a working product they can use. What do we need to build?
We need to see and respond to texts from our customers.
We need to charge customers for the things we provide (with a commission, of course). They shouldn’t need to enter their credit card every time.
We need to share this work between several people.
With Anvil, it turns out we can build this all in a couple of hours. Watch me build a fully working product in this time-lapse video, then scroll down for the play-by-play:
We use Anvil’s built-in data tables to store customers and events (messages, notes, etc), and build pages to display them. We use the Users service to authenticate operators (ie us).
Within half an hour, we’ve got the basics: We can receive SMS using an HTTP endpoint from a service like Twilio, display the conversation, and send replies.
Now a customer can ask for something, we need them to pay for it! To make purchases truly frictionless, we’ll take their credit card once, then keep it on file for anything they need in the future.
Anvil’s Stripe support makes this simple. We make an app to collect the customer’s card details, and then we send them a link to open that app on their phone:
After that, the card is on file, and we can charge them at the click of a button. (We also note our profit margin for future reference.)
If this app takes off, we’ll need help. We don’t want any messages to fall through the cracks, so we text all our operators when a new customer arrives. But we don’t want to notify every operator about every message – they’ll get drowned!
Instead, let’s track which customers need attention, and let operators “claim” customers. (We make sure two operators can’t claim the same customer by accident.)
The operator can mark a customer as Done (request resolved, no longer needs attention), or Can’t handle (still needs attention – “un-claim” the customer and text other operators for help).
If we need more information from the customer, the operator can select “Tell me when they reply”. The operator can go do something else: when the customer replies, we send an SMS to this operator only.
We’ve built the infrastructure for an SMS concierge in just a couple of hours. We can help people by text, take payment, and even coordinate a large team of operators if it suddenly gets popular. It’s a fully-working product that can take revenue right away, and scale as we grow.
Here’s how our final app works:
You can grab the source code yourself – click below to open the apps in the Anvil editor:
Want to dig into how these apps work? Our tutorials show you all the pieces these apps are made from, and more.