Commits

Rhys !  committed 43b24c7

added README; support standard json library on Python 2.6+; dropped simplejson from setup.py

  • Participants
  • Parent commits c2dbae5

Comments (0)

Files changed (4)

+Description
+===========
+**opik** is a module for easily generating and serializing RDF graphs using Python objects. See demo.py for an example.
+
+Dependencies
+============
+This package depends on rdflib. Python versions before 2.6 will also require simplejson. Use the setup.py script included for easier installation.
+
+Support
+=======
+No support for this code is guaranteed. File bugs using Bitbucket's [issues tracker](https://bitbucket.org/rimmington/opik/issues).
+
+Copyright
+=========
+Copyright (C) 2012 Rhys !
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Contact
+=======
+Preferably, problems should be solved via Bitbucket's [issues tracker](https://bitbucket.org/rimmington/opik/issues).
+
+Otherwise, contact me via [Bitbucket](https://bitbucket.org/account/notifications/send/?receiver=rimmington) or [Twitter](http://twitter.com/syhr_sg).

File opik/core.py

 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from itertools import chain
-import simplejson as json
+try:
+    import json
+except ImportError:
+    import simplejson as json
 
 from rdflib import URIRef, BNode, Literal
 from rdflib import Graph as _Graph

File opik/namespaces.py

     def __init__(self, uri, prefix=None):
         self.prefix = prefix
 
-locals().update((prefix.upper(), Namespace(uri, prefix=prefix)) for prefix, uri in prefixes.iteritems())
+locals().update((prefix.upper(), Namespace(uri, prefix=prefix)) for prefix, uri
+    in prefixes.iteritems())
     name='Opik',
     version='0.1dev',
     packages=find_packages(),
-    install_requires=['rdflib', 'simplejson'],
+    install_requires=['rdflib'],
     author='Rhys !',
     license='GPLv3',
     url='http://bitbucket.org/rimmington/opik'