You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-7Lines changed: 16 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ We have a whole site dedicated to various scenarios with lots of queries where P
49
49
Here is a small example PythonQL program (we're building a demo website with a number of scenarios that are especially good for solving with PythonQL):
50
50
51
51
```Python
52
+
#coding: pythonql
53
+
#
52
54
# This example illustrates the try-catch business in PythonQL.
53
55
# Basically, some data might be dirty, but you still want to be able to write a simple query
54
56
@@ -86,16 +88,23 @@ print (len(res))
86
88
87
89
## Installing pythonql:
88
90
89
-
Currently you need to clone this repository. In the future we'll make a pip installer.
91
+
Run ```pip3 install pythonql3``` to install pythonql for Python 3x.
92
+
Python 2x support is coming.
90
93
91
94
## Running pythonql:
92
95
93
-
Currently PythonQL is available as a pre-processor, so you need to write a pythonql script and
94
-
execute it, or execute a pythonql string. We have a runner that you can use to execute a file:
96
+
PythonQL is implemented as a special encoding in a normal python script. When this encoding is specified, the
97
+
pythonql preprocessor is run, which converts the pythonql syntax to pure python.
95
98
96
-
`python3 pythonql/RunPYQL.py <pythonql program>`
99
+
So you should have a line in the beginning of your script:
100
+
```
101
+
#coding: pythoql
102
+
103
+
result = [ select y for x in [1,2,3] let y = x**2 ]
104
+
```
97
105
98
-
## How it will work soon (and properly):
106
+
## Uninstalling pythonql:
99
107
100
-
In the near future we will reimplement PythonQL to use file encoding, hence it will compile automatically
101
-
if you mark your Python file as a PythonQL file.
108
+
PythonQL installs a special file in your library to enable the pythonql encoding.
109
+
If you decide to uninstall pythonql, run ```pip3 uninstall pythonql``` and then delete
0 commit comments