Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Validate a directory structure using JSON schemas

Project Description

A tool to check that a directory structure conforms to a given JSON Schema.

In case of check failure, following actions can be taken, depending on your configuration:

  • Output defects to the console
  • Send a file listing all defects to a Slack conference room


Using pip should suffice

pip install filemarx


You have to produce a JSON Schema file against which your directory’s structure will be validated. An example of this can be found in the samples/design.json file.

Let’s say that your file structure is this:


Then the produced JSON would be



The command takes 3 mandatory positional arguments:

  1. Check name (to be set arbitrarily)
  2. Schema file location
  3. Directory to be checked


filemarx Design samples/design.json /home/myself/designs

State-keeping options

If you run filemarx in a cron but you don’t want errors to come up every minute, you can ignore them for X seconds once discovered. This can be done with a combination of options -t which sets a timeout (in seconds) and -s which indicate where to store the state file.

# Only pop errors every hour
filemarx -t 3600 -s /tmp/design_state.json Design samples/design.json /home/myself/designs

Pushing results to Slack

filemarx can connect to the Slack API in order to push errors to a given Slack channel. In order to do that, you need to get an API Token, then use options --slack-token and --slack-channels.

# Send it all to Slack
filemarx --slack-token 'get-your-own' --slack-channels '#general,#design' -t 3600 -s /tmp/design_state.json Design samples/design.json /home/myself/designs
Release History

Release History

This version
History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
filemarx-0.1.0.tar.gz (4.6 kB) Copy SHA256 Checksum SHA256 Source Mar 1, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting