summaryrefslogtreecommitdiffstats
path: root/python/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'python/README.md')
-rw-r--r--python/README.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/python/README.md b/python/README.md
new file mode 100644
index 0000000..d626e31
--- /dev/null
+++ b/python/README.md
@@ -0,0 +1,31 @@
+# `file-magic`: Python Bindings
+
+This library is a Python ctypes interface to `libmagic`.
+
+
+## Installing
+
+You can install `file-magic` either with:
+
+ python setup.py install
+ # or
+ easy_install .
+ # or
+ pip install file-magic
+
+
+## Using
+
+ import magic
+
+ detected = magic.detect_from_filename('magic.py')
+ print 'Detected MIME type: {}'.format(detected.mime_type)
+ print 'Detected encoding: {}'.format(detected.encoding)
+ print 'Detected file type name: {}'.format(detected.name)
+
+
+## Developing/Contributing
+
+To run the tests:
+
+ python setup.py test