Skip to main content

Ranch does addressing in Python

Project description

Ranch is a dressing… get it?

In which addressing is easy

Doing addressing is hard. There’s too many exceptions, differences and human involvement; making the entire process overwhelmingly depressing.

In which addressing has never been done before

Luckily, we’re not the first people to have faced this problem. Plenty of people have attempted to tackle the problem of addressing, and plenty have succeeded! So no, Ranch isn’t reinventing the wheel entirely. Instead, we’re working with Google’s excellent i18n dataset: downloading it, parsing it, outputting data.

In which I have to do everything myself

Ranch is built as an object to store your address data in. So instead of having you access a bunch of stuff and doing checks yourself, Ranch allows you to enter address field data and poll for whatever the next set of fields is to fill in.

After that you can simply call a str(address) to correctly format the address for the address’ locality. That’s all you need to get a (technically) deliverable postal address from your users.

In which all that made sense

See try_me.py for an example: a commandline-based address form.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Ranch, version 0.2.8
Filename, size File type Python version Upload date Hashes
Filename, size Ranch-0.2.8-py3-none-any.whl (8.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page