Ravenports generated: 26 Nov 2019 23:39
[ravenports.git] / bucket_5F / python-sqlparse
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-sqlparse
4 VERSION=                0.3.0
5 KEYWORDS=               python devel
6 VARIANTS=               py27 py38 py37
7 SDESC[py37]=            Non-validating SQL parser (PY 37)
8 SDESC[py38]=            Non-validating SQL parser (PY 38)
9 SDESC[py27]=            Non-validating SQL parser (PY 27)
10 HOMEPAGE=               https://github.com/andialbrecht/sqlparse
11 CONTACT=                Python_Automaton[python@ironwolf.systems]
12
13 DOWNLOAD_GROUPS=        main
14 SITES[main]=            PYPI/s/sqlparse
15 DISTFILE[1]=            sqlparse-0.3.0.tar.gz:main
16 DF_INDEX=               1
17 SPKGS[py37]=            single
18 SPKGS[py38]=            single
19 SPKGS[py27]=            single
20
21 OPTIONS_AVAILABLE=      PY27 PY38 PY37
22 OPTIONS_STANDARD=       none
23 VOPTS[py37]=            PY27=OFF PY38=OFF PY37=ON
24 VOPTS[py38]=            PY27=OFF PY38=ON PY37=OFF
25 VOPTS[py27]=            PY27=ON PY38=OFF PY37=OFF
26
27 DISTNAME=               sqlparse-0.3.0
28
29 GENERATED=              yes
30
31 [PY37].USES_ON=                         python:py37
32
33 [PY38].USES_ON=                         python:py38
34
35 [PY27].USES_ON=                         python:py27
36
37 [FILE:1352:descriptions/desc.single]
38
39 ``sqlparse`` is a non-validating SQL parser module.
40 It provides support for parsing, splitting and formatting SQL statements.
41
42 Visit the `project page <https://github.com/andialbrecht/sqlparse>`_ for
43 additional information and documentation.
44
45 **Example Usage**
46
47
48 Splitting SQL statements::
49
50    >>> import sqlparse
51    >>> sqlparse.split('select * from foo; select * from bar;')
52    [u'select * from foo; ', u'select * from bar;']
53
54
55 Formatting statements::
56
57    >>> sql = 'select * from foo where id in (select id from bar);'
58    >>> print sqlparse.format(sql, reindent=True, keyword_case='upper')
59    SELECT *
60    FROM foo
61    WHERE id IN
62      (SELECT id
63       FROM bar);
64
65
66 Parsing::
67
68    >>> sql = 'select * from someschema.mytable where id = 1'
69    >>> res = sqlparse.parse(sql)
70    >>> res
71    (<Statement 'select...' at 0x9ad08ec>,)
72    >>> stmt = res[0]
73    >>> str(stmt)  # converting it back to unicode
74    'select * from someschema.mytable where id = 1'
75    >>> # This is how the internal representation looks like:
76    >>> stmt.tokens
77    (<DML 'select' at 0x9b63c34>,
78     <Whitespace ' ' at 0x9b63e8c>,
79     <Operator '*' at 0x9b63e64>,
80     <Whitespace ' ' at 0x9b63c5c>,
81     <Keyword 'from' at 0x9b63c84>,
82     <Whitespace ' ' at 0x9b63cd4>,
83     <Identifier 'somes...' at 0x9b5c62c>,
84     <Whitespace ' ' at 0x9b63f04>,
85     <Where 'where ...' at 0x9b5caac>)
86
87
88
89
90 [FILE:100:distinfo]
91 7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873        64072 sqlparse-0.3.0.tar.gz
92