semvec/pypi-packages huggingface dataset:
gh-commander 0.1.0.dev68
GitHub Commander – A tool to access the GitHub APIv3 from the CLI and automate otherwise tedious tasks.
License: Apache 2.0
Keywords: hosted.by.github,github,cli,tool,automation

“GitHub Commander” implements the ``gh`` command line tool,
which provides a ‘fluent’ interface using Click.
It allows to access the GitHub API v3 from a shell
prompt for things usually done in the browser, and also
automates tasks that otherwise are tedious at best,
when done by clicking around on a web page.


Copyright ©  2015 Jürgen Hermann <jh@web.de>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
sqlquery 1.1.0
SQL query translation.
License: Apache 2.0

py-sql-query
============

py-sql-query is a basic SQL translation layer in
python. You construct queries using mainly python constructs which later can be
serialized to a SQL query.

Examples
--------

A simple select statement
~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: python

    >>> from sqlquery.queryapi import select
    >>> select("id").on_table("users").where(("id__eq", 2)).sql()
    (u'SELECT `a`.`id` FROM `users` AS `a` WHERE (`a`.`id` = %s)', (2,))

A simple update statement
~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python

    >>> from sqlquery.queryapi import update
    >>> update(username="john").on_table("users").where(("id__eq", 2)).sql()
    (u'UPDATE `users` AS `a` SET `a`.`username` = %s WHERE (`a`.`id` = %s)', ('john', 2))

A simple insert statement
~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python

    >>> from sqlquery.queryapi import insert
    >>> insert(username="john", id=4).on_table("users").sql()
    (u'INSERT INTO `users` (`username`, `id`) VALUES (%s, %s)', ('john', 4))

A simple order by statement
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python

    >>> from sqlquery.queryapi import select
    >>> select("id").on_table("users").order_by("id").sql()
    (u'SELECT `a`.`id` FROM `users` AS `a` ORDER BY `a`.`id`', ())

Using a function
~~~~~~~~~~~~~~~~
.. code-block:: python

    >>> from sqlquery.queryapi import select, IF, Literal
    >>> select(IF(("id__lt", Literal(0)), "id", "newID")).on_table("users").order_by("id").sql()
    (u'SELECT IF((`a`.`id` < 0), `a`.`id`, `a`.`newID`) FROM `users` AS `a` ORDER BY `a`.`id`', ())

A subquery
~~~~~~~~~~
.. code-block:: python

    >>> from sqlquery.queryapi import select
    >>> select(
          "username", "id"
        ).on_table("users").where(
          ("id__in", select("id").on_table("banned_users"))
        ).sql()
    (u'SELECT `a`.`username`, `a`.`id` FROM `users` AS `a` WHERE (`a`.`id` IN (SELECT `b`.`id` FROM `banned_users` AS `b`))',
     ())


A more involved statement
~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python

    >>> from sqlquery.queryapi import select
    >>> select(
          "username", "id", "contactinfo.address"
        ).on_table("users").join(
          "contactinfo",
          "id",
        ).where(
          ('id__in', [1, 2, 3, 4]), ('contactinfo.country__eq', 'US')
        ).limit(10).offset(10).order_by("id").sql()
    (u'SELECT `a`.`username`, `a`.`id`, `b`.`address` FROM `users` AS `a` INNER JOIN `contactinfo` AS `b` ON `a`.`id` = `b`.`id` WHERE (`a`.`id` IN (%s,%s,%s,%s)) AND (`b`.`country` = %s) ORDER BY `a`.`id` OFFSET %s LIMIT %s',
     (1, 2, 3, 4, 'US', 10, 10))