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