Skip to content

Commit

Permalink
cleaned and organized stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhamel committed Dec 9, 2013
1 parent c0ae4b0 commit 7fb8393
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ lib/
bin/
include/
data.db
*.pyc
*.pyc
*.egg-info/
File renamed without changes.
Empty file added python/osmtlpy/__init__.py
Empty file.
8 changes: 7 additions & 1 deletion application.py → python/osmtlpy/application.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

from flask import Flask, render_template, json
from peewee import SqliteDatabase, Model, IntegerField, CharField, FloatField

Expand Down Expand Up @@ -35,8 +37,12 @@ def piscines():
return json.jsonify(result=data)


if __name__ == "__main__":
def main():
db.connect()
Piscine.create_table(True)
app.debug = True
app.run()


if __name__ == "__main__":
sys.exit(main())
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from setuptools import setup, find_packages

setup(
name='osmtlpy',
include_package_data=True,
packages=find_packages(exclude=['ez_setup']),
install_requires=[
"Flask",
"peewee",
],
entry_points="""
[console_scripts]
osmtlpy = osmtlpy.application:main
""")

0 comments on commit 7fb8393

Please sign in to comment.