Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

flatland

Flatland maps between rich, structured Python application data and the string-oriented flat namespace of web forms, key/value stores, text files and user input. Flatland provides a schema-driven mapping toolkit with optional data validation.

Flatland is great for:

  • Collecting, validating, re-displaying and processing HTML form data
  • Dealing with rich structures (lists, dicts, lists of dicts, etc.) in web data
  • Validating JSON, YAML, and other structured formats
  • Associating arbitrary Python types with JSON, .ini, or sys.argv members that would otherwise deserialize as simple strings.
  • Reusing a single data schema for HTML, JSON apis, RPC, ...

The core of the flatland toolkit is a flexible and extensible declarative schema system representing many data types and structures.

A validation system and library of schema-aware validators is also provided, with rich i18n capabilities for use in HTML, network APIs and other environments where user-facing messaging is required.

Availability

The hg flatland tip can be installed via easy_install flatland==dev.

Recent activity

jason kirtland

jason kirtland pushed 3 commits to jek/flatland

bb7ecc6 - tox: fix doctest invocation (correct pathes, no -W)
a6b8cd1 - remove py25 from tox.ini as 2.6 is minimum requirement
4798d67 - work around the not working flatland import in setup.py
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.