Comments (21)
Acked. I have plans for it in the near future.
Thanks
from q.
+1
from q.
👍
from q.
I see there is high demand for it :)
I'll try to make room for it so it wlil go into the upcoming 1.5.0 version (due in a couple of weeks).
I'll update here.
Harel
from q.
I've created an API which will allow working with q from inside python programs. I'll upload an alpha version to the master branch in the coming day or two.
Hopefully, it'll be good enough to be released as part of the upcoming 1.5.0 version. Once it is good enough, I'll also finish the job of making qtextasdata a proper pypi module so it can be installed through pip.
Any comments regarding it will be most appreciated.
from q.
Alpha branch of the python api has been committed to https://github.com/harelba/q/tree/expose-as-python-api.
Hopefully, I'll find a good way to make this a proper pypi package without needing to replace all the installation code. If I manage to do that, then this addition will come out in the coming 1.5.0 version.
Any input would be helpful and appreciated.
Harel
from q.
Forgot to write - The readme file of the branch contains the required information about the API.
from q.
What if you split the q python package into a pypi installable package (although q
is taken), and then made it a dependency of the system installable q-text-as-data?
from q.
Writing the same response here, for other people as well.
That's what probably I'll do eventually if there is no other option, but that's exactly what I wanted to prevent - Doing that would require fixing all the installation code for homebrew/rpm/debian/arch, and I would really like to find a good way to work around doing that, since it will postpone the time the API support will be released.
from q.
OK, how about this then:
Split the q python package into a pypi installable package, and then pull it in here as a git submodule, rather than as a system package or Python dependency?
from q.
Let's decide that all the discussions regarding this subject will continue here on this issue's comments.
@webmaven , this might be a good idea regardless of the issue at hand, but it won't prevent the need to rewrite all installations.
One of the complications in it being a python module is that you need pip to be installed on the user's machine. Another idea would be to have the module code reside in some private directory which only q (the command line interface) would know about.
I'm starting to think that rewriting the installations would be a must. In that case, I would prefer to try again to provided a binary compiled version of q. However, when I tried it in the past it "almost worked". Everything worked well, but there were some GLIBC versioning issues with old Linux machines.
If you have experience with compiling python for old linux machines using PyInstalled, any information about it would be great.
Harel
from q.
A python distributable package is just a package directory (or module) nested in another directory with a bunch of extra stuff, which can easily be ignored.
So if the package is in it's own repo, I think that making it a submodule of this one should prevent most rewriting. It certainly won't need to be pip installed.
from q.
Maybe I'm missing a part of your point, @webmaven, but there's another implicit requirement for this - The need not to duplicate any code. I don't want the executable "q" to contain the same code of the qtextasdata python module. Does what you're suggesting cover this?
from q.
A git submodule is basically transcluded, you need ever only edit the python code once, in either location, but you would be publishing it twice, as both an exectuable command and as an installable python module. Which is your concern?
from q.
Thanks, I believe I see your point. I'll take a look at it.
from q.
As part of the 1.5.0 release that I've released today, the q command line now uses a full-blown python module and API behind the scenes.
Exposing it as a PyPI python module will be a separate phase, after reviews by the community of the new API.
You can take a look at the python API here. Any comments would be most appreciated.
from q.
I haven't looked over it in detail, but I would recommend going ahead and putting on Pypi before someone else grabs the name q
.
... too late, looks like someone already has grabbed the name q
.
from q.
... too late, looks like someone already has grabbed the name q.
Yes, I noted that upthread: #24 (comment)
from q.
Any suggestions for a different package name?
from q.
qlib? But the confusion with Qt related libs might be too great. So qapi?
from q.
qball, quirk, qlever, qore, etc.?
from q.
Related Issues (20)
- Can we support more glibc version ? HOT 1
- Setting default delimiter in .qrc config file? HOT 2
- Escape table name to avoid filename replacement
- local install fails due to setup.py HOT 3
- Feature request: replace spaces in column names with underline
- HOT 1
- Cannot run WIndows build HOT 4
- How do I use it in GitHub Actions?
- Header -O problem with -b beautify and -f format HOT 1
- Using q inside Windows PowerShell causes encoding issues
- q can't be installed with home-brew anymore HOT 3
- Is entire file loaded into memory to be queried? would prefer read line by line, not whole file loaded in (10Gb file) HOT 2
- Warning about BOM suggest incorrect flag
- header mis-interpretation HOT 1
- Exception ignored in _io.TextIOWrapper when piping output to less HOT 1
- IS DISTINCT FROM not working HOT 1
- ENH: Would you consider making q available through conda? HOT 6
- How does the speed depend on the environment? HOT 2
- Always getting "query error: near "~": syntax error" error HOT 4
- BUG: Packaging in broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from q.