Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:jeffknupp/sandman into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Knupp committed Dec 24, 2013
2 parents a029768 + 4a94152 commit 3c0953c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
21 changes: 7 additions & 14 deletions scripts/sandmanctl → sandman/sandmanctl.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
#! /usr/bin/env python
"""Script to run sandman via command line
Usage:
sandmanctl.py [URI]
sandmanctl.py URI
Start sandman and connect to database at URI
Supported database dialects:
[PostgreSQL]
[MySQL]
[Oracle]
[Microsoft SQL Server]
[Oracle]
[Microsoft SQL Server]
[SQLite]
[Drizzle]
[Firebird]
Expand All @@ -28,25 +27,19 @@
Options:
-h --help Show this screen.
'postgresql+psycopg2://scott:tiger@localhost/test'
"""

import argparse
import os
import sys
from __future__ import absolute_import

from docopt import docopt

from sandman import app, db
from sandman import app
from sandman.model import activate

def main():
options = docopt(__doc__)
app.config['SQLALCHEMY_DATABASE_URI'] = options['URI']
activate(admin=True)
app.run('0.0.0.0', debug=True)

if __name__ == '__main__':
sys.exit(main())
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,17 @@ def run_tests(self):
'Flask-SQLAlchemy>=1.0',
'SQLAlchemy>=0.8.2',
'Flask-Admin>=1.0.6',
'docopt>=0.6.1',
],
cmdclass={'test': PyTest},
author_email='jeff@jeffknupp.com',
description='Automated REST APIs for existing database-driven systems',
long_description=long_description,
scripts=['scripts/sandmanctl'],
entry_points={
'console_scripts': [
'sandmanctl = sandman.sandmanctl:main',
],
},
packages=['sandman', 'sandman.model'],
include_package_data=True,
platforms='any',
Expand Down

0 comments on commit 3c0953c

Please sign in to comment.