forked from ponyorm/pony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
112 lines (95 loc) · 3.72 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
from __future__ import print_function
from distutils.core import setup
import sys
name = "pony"
version = __import__('pony').__version__
description = "Pony Object-Relational Mapper"
long_description = """
About
=========
Pony ORM is easy to use and powerful object-relational mapper for Python.
Using Pony, developers can create and maintain database-oriented software applications
faster and with less effort. One of the most interesting features of Pony is
its ability to write queries to the database using generator expressions.
Pony then analyzes the abstract syntax tree of a generator and translates it
to its SQL equivalent.
Following is an example of a query in Pony::
select(p for p in Product if p.name.startswith('A') and p.cost <= 1000)
Such approach simplify the code and allows a programmer to concentrate
on the business logic of the application.
Pony translates queries to SQL using a specific database dialect.
Currently Pony works with SQLite, MySQL, PostgreSQL and Oracle databases.
The package `pony.orm.examples <https://github.com/ponyorm/pony/tree/orm/pony/orm/examples>`_
contains several examples.
Installation
=================
::
pip install pony
Entity-Relationship Diagram Editor
=============================================
`Pony online ER Diagram Editor <https://editor.ponyorm.com>`_ is a great tool for prototyping.
You can draw your ER diagram online, generate Pony entity declarations or SQL script for
creating database schema based on the diagram and start working with the database in seconds.
Pony ORM Links:
=================
- Main site: http://ponyorm.com
- Documentation: http://doc.ponyorm.com
- GitHub: https://github.com/ponyorm/pony
- Mailing list: http://ponyorm-list.ponyorm.com
- ER Diagram Editor: https://editor.ponyorm.com
- Blog: http://blog.ponyorm.com
"""
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: Free for non-commercial use',
'License :: OSI Approved :: GNU Affero General Public License v3',
'License :: Other/Proprietary License',
'License :: Free For Educational Use',
'License :: Free for non-commercial use',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Software Development :: Libraries',
'Topic :: Database'
]
author = "Alexander Kozlovsky, Alexey Malashkevich"
author_email = "[email protected]"
url = "http://ponyorm.com"
lic = "AGPL, Commercial, Free for educational and non-commercial use"
packages = [
"pony",
"pony.orm",
"pony.orm.dbproviders",
"pony.orm.examples",
"pony.orm.integration",
"pony.orm.tests",
"pony.thirdparty",
"pony.thirdparty.compiler"
]
download_url = "http://pypi.python.org/pypi/pony/"
if __name__ == "__main__":
pv = sys.version_info[:2]
if pv not in ((2, 6), (2, 7), (3, 3), (3, 4)):
s = "Sorry, but %s %s requires Python of one of the following versions: 2.6, 2.7, 3.3 or 3.4." \
" You have version %s"
print(s % (name, version, sys.version.split(' ', 1)[0]))
sys.exit(1)
setup(
name=name,
version=version,
description=description,
long_description=long_description,
classifiers=classifiers,
author=author,
author_email=author_email,
url=url,
license=lic,
packages=packages,
download_url=download_url
)