aioodbc - is a library for accessing a ODBC databases from the asyncio

Overview

aioodbc

https://travis-ci.com/aio-libs/aioodbc.svg?branch=master https://coveralls.io/repos/aio-libs/aioodbc/badge.svg?branch=master&service=github Chat on Gitter

aioodbc is a Python 3.5+ module that makes it possible to access ODBC databases with asyncio. It relies on the awesome pyodbc library and preserves the same look and feel. aioodbc was written using async/await syntax (PEP492) and thus is not compatible with Python versions older than 3.5. Internally aioodbc employs threads to avoid blocking the event loop, threads are not that as bad as you think!. Other drivers like motor use the same approach.

aioodbc is fully compatible and tested with uvloop. Take a look at the test suite, all tests are executed with both the default event loop and uvloop.

Supported Databases

aioodbc should work with all databases supported by pyodbc. But for now the library has been tested with: SQLite, MySQL and PostgreSQL. Feel free to add other databases to the test suite by submitting a PR.

Community

Mailing List: https://groups.google.com/forum/#!forum/aio-libs

Chat room: https://gitter.im/aio-libs/Lobby

Basic Example

aioodbc is based on pyodbc and provides the same api, you just need to use yield from conn.f() or await conn.f() instead of conn.f()

Properties are unchanged, so conn.prop is correct as well as conn.prop = val.

import asyncio
import aioodbc


loop = asyncio.get_event_loop()


async def test_example():
    dsn = 'Driver=SQLite;Database=sqlite.db'
    conn = await aioodbc.connect(dsn=dsn, loop=loop)

    cur = await conn.cursor()
    await cur.execute("SELECT 42 AS age;")
    rows = await cur.fetchall()
    print(rows)
    print(rows[0])
    print(rows[0].age)
    await cur.close()
    await conn.close()

loop.run_until_complete(test_example())

Connection Pool

Connection pooling is ported from aiopg and relies on PEP492 features:

import asyncio
import aioodbc


loop = asyncio.get_event_loop()


async def test_pool():
    dsn = 'Driver=SQLite;Database=sqlite.db'
    pool = await aioodbc.create_pool(dsn=dsn, loop=loop)

    async with pool.acquire() as conn:
        cur = await conn.cursor()
        await cur.execute("SELECT 42;")
        r = await cur.fetchall()
        print(r)
        await cur.close()
        await conn.close()
    pool.close()
    await pool.wait_closed()

loop.run_until_complete(test_pool())

Context Managers

Pool, Connection and Cursor objects support the context management protocol:

import asyncio
import aioodbc


loop = asyncio.get_event_loop()


async def test_example():
    dsn = 'Driver=SQLite;Database=sqlite.db'

    async with aioodbc.create_pool(dsn=dsn, loop=loop) as pool:
        async with pool.acquire() as conn:
            async with conn.cursor() as cur:
                await cur.execute('SELECT 42 AS age;')
                val = await cur.fetchone()
                print(val)
                print(val.age)

loop.run_until_complete(test_example())

Installation

In a linux environment pyodbc (hence aioodbc) requires the unixODBC library. You can install it using your package manager, for example:

$ sudo apt-get install unixodbc
$ sudo apt-get install unixodbc-dev

then:

pip install aioodbc

Run tests

For testing purposes you need to install docker and the development requirements:

$ pip install -r requirements-dev.txt

In order to simplify development you should install the provided docker container. This way you don't need to install any databases or other system libraries, everything happens inside the container.

Then just execute:

$ make docker_build
$ make docker_test

The test will automatically pull images and build containers with the required databases.

NOTE: Running tests requires Python 3.6 or higher.

Other SQL Drivers

  • aiopg - asyncio client for PostgreSQL
  • aiomysql - asyncio client form MySQL

Requirements

Comments
  • fix for #195

    fix for #195

    What do these changes do?

    Ensures we don't return bad connections back to the pool

    Are there changes in behavior for the user?

    Bad connections will no longer poison the pool

    Related issue number

    #195

    Checklist

    • [x] I think the code is well written
    • [x] Unit tests for the changes exist
    • [x] Documentation reflects the changes
    • [x] Add a new news fragment into the CHANGES folder
      • name it <issue_id>.<type> (e.g. 588.bugfix)
      • if you don't have an issue_id change it to the pr id after creating the PR
      • ensure type is one of the following:
        • .feature: Signifying a new feature.
        • .bugfix: Signifying a bug fix.
        • .doc: Signifying a documentation improvement.
        • .removal: Signifying a deprecation or removal of public API.
        • .misc: A ticket has been closed, but it is not of interest to users.
      • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.
    opened by thehesiod 7
  • MySQL connection (Question)

    MySQL connection (Question)

    Hello. How can i create a permanent connection to database with aiodbc and use it for all queries like this:

    cnxn   = pyodbc.connect(...)
    cursor = cnxn.cursor()
    cursor.execute(...)
    

    I don't want to create a new connection to the database every time to make a query. Thanks.

    opened by romkazor 5
  • SQLite database contents is not preserved between reconnections

    SQLite database contents is not preserved between reconnections

    I'm trying to use aioodbc for working with SQLite database and struggling with issue that database content is not preserved after closing connection.

    Take a look at the following example:

    import asyncio
    import aioodbc
    
    
    loop = asyncio.get_event_loop()
    
    
    async def test_example():
        dsn = 'Driver=SQLite;Database=test_db.sqlite'
        async with aioodbc.connect(dsn=dsn, loop=loop) as conn:
            async with await conn.cursor() as cur:
                await cur.execute("CREATE TABLE test (id INTEGER PRIMARY KEY)")
                await cur.execute("INSERT INTO test VALUES (1)")
                await cur.execute("SELECT * FROM test")
                r = await cur.fetchall()
                print(r)
    
        async with aioodbc.connect(dsn=dsn, loop=loop) as conn:
            async with await conn.cursor() as cur:
                # This line fails:
                # pyodbc.Error: ('HY000', '[HY000] [SQLite]no such table: test (1) (1) (SQLExecDirectW)')
                await cur.execute("SELECT * FROM test")
                r = await cur.fetchall()
                print(r)
    
    loop.run_until_complete(test_example())
    

    in this example I create table, insert value, close DB, then reopen DB and try to read inserted value. This fails with:

    $ python test_odbc.py 
    [(1, )]
    Traceback (most recent call last):
      File "test_odbc.py", line 24, in <module>
        loop.run_until_complete(test_example())
      File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
        return future.result()
      File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
        raise self._exception
      File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
        result = coro.send(None)
      File "test_odbc.py", line 20, in test_example
        await cur.execute("SELECT * FROM test")
      File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
        yield self  # This tells Task to wait for completion.
      File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
        future.result()
      File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
        raise self._exception
      File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
        result = self.fn(*self.args, **self.kwargs)
    pyodbc.Error: ('HY000', '[HY000] [SQLite]no such table: test (1) (1) (SQLExecDirectW)')
    

    Perhaps I'm missing some configuration parameter? test_db.sqlite file is created, but empty.

    I'm running on Ubuntu 16.04 with Python 3.5 in virtualenv.

    $ pip list
    aioodbc (0.0.3)
    pip (8.1.1)
    pkg-resources (0.0.0)
    pyodbc (3.0.10)
    setuptools (20.7.0)
    
    opened by rutsky 4
  • Connection not returning to pool

    Connection not returning to pool

    Hey, I have confusing problem. There is an endpoint that makes for example 15 queries. On development environment I create pool of exactly 10 to 20 connections and I expect that after hitting this endpoint I will be able to hit it again, especially that it don't use those connections all at once, but I get concurrent.futures._base.CancelledError error instead so it looks like connection didn't return to pool and framework triggered standard RequestTimeoutError (I made this assumption because increasing pool size solves the problem).

    I make queries with this code:

    from collections import namedtuple
    
    from sanic.exceptions import NotFound
    
    
    def _row_namedtuple(cursor):
        return namedtuple('Row', _field_names(cursor))
    
    
    def _field_names(cursor):
        return [name[0].lower() for name in cursor.description]
    
    
    class DbExecutor:
        def __init__(self, sql, pool, params=()):
            self.sql = sql
            self.params = params
            self.pool = pool
            self._connection = None
            self._cursor = None
    
        async def __aenter__(self):
            self._connection = await self.pool.acquire()
            self._cursor = await self._connection.cursor()
            await self._cursor.execute(self.sql, self.params)
            return self._cursor
    
        async def __aexit__(self, exc_type, exc, tb):
            await self._cursor.close()
            await self._connection.close()
    
    
    async def fetch_dict_all(sql, pool, params=()):
        async with DbExecutor(sql, pool, params) as cursor:
            return [dict(zip(_field_names(cursor), row)) for row in await cursor.fetchall()]
    
    
    async def fetch_dict_row(sql, pool, params=()):
        async with DbExecutor(sql, pool, params) as cursor:
            row = await cursor.fetchone()
            return dict(zip(_field_names(cursor), row)) if row else []
    

    create pool with this code:

    @app.listener('before_server_start')
    async def create_pool(app, loop):
        dsn = 'DRIVER=OracleODBC;DBQ=server;UID=login;PWD=password'
        app.db = await aioodbc.create_pool(dsn=dsn, loop=loop, minsize=10, maxsize=10)
    
    
    @app.listener('after_server_stop')
    async def discard_pool(app, loop):
        app.db.close()
        await app.db.wait_closed()
    

    example of query:

    details = await fetch_dict_all('sql query', app.db, params)
    
    Ubuntu 16.04
    Oracle ODBC Driver
    aioodbc == 0.2.0
    pyodbc == 4.0.21
    
    opened by dszmaj 3
  • Bump sphinx from 2.2.0 to 3.3.0

    Bump sphinx from 2.2.0 to 3.3.0

    Bumps sphinx from 2.2.0 to 3.3.0.

    Changelog

    Sourced from sphinx's changelog.

    Release 3.3.0 (released Nov 02, 2020)

    Deprecated

    • sphinx.builders.latex.LaTeXBuilder.usepackages
    • sphinx.builders.latex.LaTeXBuilder.usepackages_afger_hyperref
    • sphinx.ext.autodoc.SingledispatchFunctionDocumenter
    • sphinx.ext.autodoc.SingledispatchMethodDocumenter

    Features added

    • #8100: html: Show a better error message for failures on copying html_static_files
    • #8141: C: added a maxdepth option to :rst:dir:c:alias to insert nested declarations.
    • #8081: LaTeX: Allow to add LaTeX package via app.add_latex_package() until just before writing .tex file
    • #7996: manpage: Add :confval:man_make_section_directory to make a section directory on build man page
    • #8289: epub: Allow to suppress "duplicated ToC entry found" warnings from epub builder using :confval:suppress_warnings.
    • #8298: sphinx-quickstart: Add :option:sphinx-quickstart --no-sep option
    • #8304: sphinx.testing: Register public markers in sphinx.testing.fixtures
    • #8051: napoleon: use the obj role for all See Also items
    • #8050: napoleon: Apply :confval:napoleon_preprocess_types to every field
    • C and C++, show line numbers for previous declarations when duplicates are detected.
    • #8183: Remove substitution_reference nodes from doctree only on LaTeX builds

    Bugs fixed

    • #8085: i18n: Add support for having single text domain
    • #6640: i18n: Failed to override system message translation
    • #8143: autodoc: AttributeError is raised when False value is passed to autodoc_default_options
    • #8103: autodoc: functools.cached_property is not considered as a property
    • #8190: autodoc: parsing error is raised if some extension replaces docstring by string not ending with blank lines
    • #8142: autodoc: Wrong constructor signature for the class derived from typing.Generic
    • #8157: autodoc: TypeError is raised when annotation has invalid args
    • #7964: autodoc: Tuple in default value is wrongly rendered
    • #8200: autodoc: type aliases break type formatting of autoattribute
    • #7786: autodoc: can't detect overloaded methods defined in other file
    • #8294: autodoc: single-string slots is not handled correctly
    • #7785: autodoc: autodoc_typehints='none' does not effect to overloaded functions
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump pytest from 5.2.0 to 6.1.1

    Bump pytest from 5.2.0 to 6.1.1

    Bumps pytest from 5.2.0 to 6.1.1.

    Release notes

    Sourced from pytest's releases.

    6.1.1

    pytest 6.1.1 (2020-10-03)

    Bug Fixes

    • #7807: Fixed regression in pytest 6.1.0 causing incorrect rootdir to be determined in some non-trivial cases where parent directories have config files as well.
    • #7814: Fixed crash in header reporting when testpaths is used and contains absolute paths (regression in 6.1.0).

    6.1.0

    pytest 6.1.0 (2020-09-26)

    Breaking Changes

    • #5585: As per our policy, the following features which have been deprecated in the 5.X series are now removed:

      • The funcargnames read-only property of FixtureRequest, Metafunc, and Function classes. Use fixturenames attribute.
      • @pytest.fixture no longer supports positional arguments, pass all arguments by keyword instead.
      • Direct construction of Node subclasses now raise an error, use from_parent instead.
      • The default value for junit_family has changed to xunit2. If you require the old format, add junit_family=xunit1 to your configuration file.
      • The TerminalReporter no longer has a writer attribute. Plugin authors may use the public functions of the TerminalReporter instead of accessing the TerminalWriter object directly.
      • The --result-log option has been removed. Users are recommended to use the pytest-reportlog plugin instead.

      For more information consult Deprecations and Removals in the docs.

    Deprecations

    • #6981: The pytest.collect module is deprecated: all its names can be imported from pytest directly.

    • #7097: The pytest._fillfuncargs function is deprecated. This function was kept for backward compatibility with an older plugin.

      It's functionality is not meant to be used directly, but if you must replace it, use function._request._fillfixtures() instead, though note this is not a public API and may break in the future.

    • #7210: The special -k '-expr' syntax to -k is deprecated. Use -k 'not expr' instead.

      The special -k 'expr:' syntax to -k is deprecated. Please open an issue if you use this and want a replacement.

    • #7255: The pytest_warning_captured <_pytest.hookspec.pytest_warning_captured> hook is deprecated in favor of pytest_warning_recorded <_pytest.hookspec.pytest_warning_recorded>, and will be removed in a future version.

    • #7648: The gethookproxy() and isinitpath() methods of FSCollector and Package are deprecated;

    Changelog

    Sourced from pytest's changelog.

    Commits
    • 0ad20b5 Prepare release version 6.1.1
    • 9df5267 Merge pull request #7842 from bluetech/backport-7817
    • 1521849 terminal: fix crash in header reporting when absolute testpaths is used
    • bcb94c4 Merge pull request #7822 from bluetech/backport-7813
    • 0f83df4 Merge pull request #7813 from bluetech/findpaths-confusion
    • 330caac [6.1.x] Improve docs about plugin discovery/loading at startup (#7803)
    • 08a1ab3 Merge pull request #7797 from pytest-dev/release-6.1.0
    • 868bc00 Prepare release version 6.1.0
    • 0b327cc Merge pull request #7796 from bluetech/changelog-cleanups
    • d3c746e changelog: some consistency cleanups
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump pytest from 5.2.0 to 6.1.0

    Bump pytest from 5.2.0 to 6.1.0

    Bumps pytest from 5.2.0 to 6.1.0.

    Release notes

    Sourced from pytest's releases.

    6.1.0

    pytest 6.1.0 (2020-09-26)

    Breaking Changes

    • #5585: As per our policy, the following features which have been deprecated in the 5.X series are now removed:

      • The funcargnames read-only property of FixtureRequest, Metafunc, and Function classes. Use fixturenames attribute.
      • @pytest.fixture no longer supports positional arguments, pass all arguments by keyword instead.
      • Direct construction of Node subclasses now raise an error, use from_parent instead.
      • The default value for junit_family has changed to xunit2. If you require the old format, add junit_family=xunit1 to your configuration file.
      • The TerminalReporter no longer has a writer attribute. Plugin authors may use the public functions of the TerminalReporter instead of accessing the TerminalWriter object directly.
      • The --result-log option has been removed. Users are recommended to use the pytest-reportlog plugin instead.

      For more information consult Deprecations and Removals in the docs.

    Deprecations

    • #6981: The pytest.collect module is deprecated: all its names can be imported from pytest directly.

    • #7097: The pytest._fillfuncargs function is deprecated. This function was kept for backward compatibility with an older plugin.

      It's functionality is not meant to be used directly, but if you must replace it, use function._request._fillfixtures() instead, though note this is not a public API and may break in the future.

    • #7210: The special -k '-expr' syntax to -k is deprecated. Use -k 'not expr' instead.

      The special -k 'expr:' syntax to -k is deprecated. Please open an issue if you use this and want a replacement.

    • #7255: The pytest_warning_captured <_pytest.hookspec.pytest_warning_captured> hook is deprecated in favor of pytest_warning_recorded <_pytest.hookspec.pytest_warning_recorded>, and will be removed in a future version.

    • #7648: The gethookproxy() and isinitpath() methods of FSCollector and Package are deprecated; use self.session.gethookproxy() and self.session.isinitpath() instead. This should work on all pytest versions.

    Features

    • #7667: New --durations-min command-line flag controls the minimal duration for inclusion in the slowest list of tests shown by --durations. Previously this was hard-coded to 0.005s.

    Improvements

    Changelog

    Sourced from pytest's changelog.

    Commits
    • 868bc00 Prepare release version 6.1.0
    • 0b327cc Merge pull request #7796 from bluetech/changelog-cleanups
    • d3c746e changelog: some consistency cleanups
    • d3f47bf Improved 'Declaring new hooks' section in docs. (#7782)
    • 3db2489 Merge pull request #7784 from nicoddemus/use-new-pip-solver-7783
    • 8215625 Use new pip resolver in plugins tox env
    • 5cfd7c0 Merge pull request #7780 from bluetech/final
    • a99ca87 Mark some public and to-be-public classes as @final
    • 050c2df Use multiple issue template types and mention Discussions (#7739)
    • cdfdb3a Add docs about reusing fixtures from other projects (#7772)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump pytest from 5.2.0 to 6.0.2

    Bump pytest from 5.2.0 to 6.0.2

    Bumps pytest from 5.2.0 to 6.0.2.

    Release notes

    Sourced from pytest's releases.

    6.0.2

    pytest 6.0.2 (2020-09-04)

    Bug Fixes

    • #7148: Fixed --log-cli potentially causing unrelated print output to be swallowed.
    • #7672: Fixed log-capturing level restored incorrectly if caplog.set_level is called more than once.
    • #7686: Fixed NotSetType.token being used as the parameter ID when the parametrization list is empty. Regressed in pytest 6.0.0.
    • #7707: Fix internal error when handling some exceptions that contain multiple lines or the style uses multiple lines (--tb=line for example).

    6.0.1

    pytest 6.0.1 (2020-07-30)

    Bug Fixes

    • #7394: Passing an empty help value to Parser.add_option is now accepted instead of crashing when running pytest --help. Passing None raises a more informative TypeError.
    • #7558: Fix pylint not-callable lint on pytest.mark.parametrize() and the other builtin marks: skip, skipif, xfail, usefixtures, filterwarnings.
    • #7559: Fix regression in plugins using TestReport.longreprtext (such as pytest-html) when TestReport.longrepr is not a string.
    • #7569: Fix logging capture handler's level not reset on teardown after a call to caplog.set_level().

    6.0.0

    pytest 6.0.0 (2020-07-28)

    (Please see the full set of changes for this release also in the 6.0.0rc1 notes below)

    Breaking Changes

    • #5584: PytestDeprecationWarning are now errors by default.

      Following our plan to remove deprecated features with as little disruption as possible, all warnings of type PytestDeprecationWarning now generate errors instead of warning messages.

      The affected features will be effectively removed in pytest 6.1, so please consult the Deprecations and Removals section in the docs for directions on how to update existing code.

      In the pytest 6.0.X series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your pytest.ini file:

    Changelog

    Sourced from pytest's changelog.

    Commits
    • 09b1d7c Prepare release version 6.0.2
    • ea65ea8 Merge pull request #7717 from bluetech/backport-7614
    • f4f30d7 Merge pull request #7716 from bluetech/backport-7697
    • 309810a Merge pull request #7715 from bluetech/backport-7651
    • e63fac3 Merge pull request #7614 from The-Compiler/log-print
    • cb91c50 Merge pull request #7697 from nicoddemus/file-docs
    • 9a879ee Merge pull request #7651 from bluetech/capture-safe-disable
    • e9d18bd Merge pull request #7711 from nicoddemus/backport-7708
    • 912870d Merge pull request #7708 from nicoddemus/repr-line-7707
    • 0115b71 Merge pull request #7688 from nicoddemus/backport-7687
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump ipython from 7.8.0 to 7.18.1

    Bump ipython from 7.8.0 to 7.18.1

    Bumps ipython from 7.8.0 to 7.18.1.

    Commits
    • 95d2b79 release 7.18.1
    • 9c3c238 Merge pull request #12524 from meeseeksmachine/auto-backport-of-pr-12413-on-7.x
    • 6e65c1a Merge pull request #12525 from ipython/revert-12488-auto-backport-of-pr-12207...
    • 2d949cd Revert "Backport PR #12207 on branch 7.x (Bump jedi to at least 0.16.0 and fi...
    • 075cbef Backport PR #12413: catch unrecoverable error
    • 7f87cb9 back to dev
    • 62779a1 release 7.18.0
    • b9ab601 Merge pull request #12520 from meeseeksmachine/auto-backport-of-pr-12517-on-7.x
    • 4e0e8a6 Backport PR #12517: Finish What's new for 7.18
    • 2e36cb9 Merge pull request #12519 from Carreau/auto-backport-of-pr-12514-on-7.x
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump sphinx from 2.2.0 to 3.2.1

    Bump sphinx from 2.2.0 to 3.2.1

    Bumps sphinx from 2.2.0 to 3.2.1.

    Changelog

    Sourced from sphinx's changelog.

    Release 3.2.1 (released Aug 14, 2020)

    Features added

    • #8095: napoleon: Add :confval:napoleon_preprocess_types to enable the type preprocessor for numpy style docstrings
    • #8114: C and C++, parse function attributes after parameters and qualifiers.

    Bugs fixed

    • #8074: napoleon: Crashes during processing C-ext module
    • #8088: napoleon: "Inline literal start-string without end-string" warning in Numpy style Parameters section
    • #8084: autodoc: KeyError is raised on documenting an attribute of the broken class
    • #8091: autodoc: AttributeError is raised on documenting an attribute on Python 3.5.2
    • #8099: autodoc: NameError is raised when target code uses TYPE_CHECKING
    • C++, fix parsing of template template paramters, broken by the fix of #7944

    Release 3.2.0 (released Aug 08, 2020)

    Deprecated

    • sphinx.ext.autodoc.members_set_option()
    • sphinx.ext.autodoc.merge_special_members_option()
    • sphinx.writers.texinfo.TexinfoWriter.desc
    • C, parsing of pre-v3 style type directives and roles, along with the options :confval:c_allow_pre_v3 and :confval:c_warn_on_allowed_pre_v3.

    Features added

    • #2076: autodoc: Allow overriding of exclude-members in skip-member function
    • #8034: autodoc: :private-member: can take an explicit list of member names to be documented
    • #2024: autosummary: Add :confval:autosummary_filename_map to avoid conflict of filenames between two object with different case
    • #8011: autosummary: Support instance attributes as a target of autosummary directive
    • #7849: html: Add :confval:html_codeblock_linenos_style to change the style of line numbers for code-blocks
    • #7853: C and C++, support parameterized GNU style attributes.
    • #7888: napoleon: Add aliases Warn and Raise.
    • #7690: napoleon: parse type strings and make them hyperlinks as possible. The
    Commits
    • 3597942 Bump to 3.2.1 final
    • 5d70682 Merge pull request #8108 from tk0miya/8099_NameError_for_TYPE_CHECKING
    • d391212 Merge branch '3.2.x' into 8099_NameError_for_TYPE_CHECKING
    • 90e9b31 Merge pull request #8117 from jakobandersen/c_cpp_function_attributes
    • 52140be C and C++, parsing function attributes
    • 667a188 Merge pull request #8113 from jakobandersen/cpp_template_template
    • d72fedb C++, fix template template parameter parsing
    • 611fff9 Fix #8099: autodoc: NameError is raised when script uses TYPE_CHECKING
    • 99e3639 Update CHANGES for PR #8095
    • 6e62d33 Merge pull request #8095 from keewis/toggle-preprocessor
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • Bump sphinx from 2.2.0 to 3.2.0

    Bump sphinx from 2.2.0 to 3.2.0

    Bumps sphinx from 2.2.0 to 3.2.0.

    Changelog

    Sourced from sphinx's changelog.

    Release 3.2.0 (released Aug 08, 2020)

    Deprecated

    • sphinx.ext.autodoc.members_set_option()
    • sphinx.ext.autodoc.merge_special_members_option()
    • sphinx.writers.texinfo.TexinfoWriter.desc
    • C, parsing of pre-v3 style type directives and roles, along with the options :confval:c_allow_pre_v3 and :confval:c_warn_on_allowed_pre_v3.

    Features added

    • #2076: autodoc: Allow overriding of exclude-members in skip-member function
    • #8034: autodoc: :private-member: can take an explicit list of member names to be documented
    • #2024: autosummary: Add :confval:autosummary_filename_map to avoid conflict of filenames between two object with different case
    • #8011: autosummary: Support instance attributes as a target of autosummary directive
    • #7849: html: Add :confval:html_codeblock_linenos_style to change the style of line numbers for code-blocks
    • #7853: C and C++, support parameterized GNU style attributes.
    • #7888: napoleon: Add aliases Warn and Raise.
    • #7690: napoleon: parse type strings and make them hyperlinks as possible. The conversion rule can be updated via :confval:napoleon_type_aliases
    • #8049: napoleon: Create a hyperlink for each the type of parameter when :confval:napoleon_use_params is False
    • C, added :rst:dir:c:alias directive for inserting copies of existing declarations.
    • #7745: html: inventory is broken if the docname contains a space
    • #7991: html search: Allow searching for numbers
    • #7902: html theme: Add a new option :confval:globaltoc_maxdepth to control the behavior of globaltoc in sidebar
    • #7840: i18n: Optimize the dependencies check on bootstrap
    • #7768: i18n: :confval:figure_language_filename supports docpath token
    • #5208: linkcheck: Support checks for local links
    • #5090: setuptools: Link verbosity to distutils' -v and -q option
    • #6698: doctest: Add :trim-doctest-flags: and :no-trim-doctest-flags: options to doctest, testcode and testoutput directives
    • #7052: add :noindexentry: to the Python, C, C++, and Javascript domains. Update the documentation to better reflect the relationship between this option and the :noindex: option.
    • #7899: C, add possibility of parsing of some pre-v3 style type directives and roles and try to convert them to equivalent v3 directives/roles. Set the new option :confval:c_allow_pre_v3 to True to enable this. The warnings printed from this functionality can be suppressed by setting :confval:`c_warn_on_allowed_pre_v3toTrue``.
    Commits
    • e91f8a7 Bump to 3.2.0 final
    • b4efb8c Merge CHANGES of 3.1.3 (unreleased) to 3.2.0
    • 5fd8996 Update CHANGES for PR #8071
    • b2d3f06 Merge pull request #8071 from asmeurer/self-reference-warning-type
    • 2a59fbc Make the toc.circular suppress_warnings flag apply to self referenced toctrees
    • f92fa64 Merge pull request #8038 from keewis/custom-get_documenter
    • 697dff3 Merge pull request #8042 from tk0miya/8041_ivar_on_superclass_not_shown
    • 88b2ec6 Fix #8041: autodoc: An ivar on super class is not shown unexpectedly
    • 5aa774b Merge pull request #8056 from tk0miya/7780_multi_params_in_numpydoc
    • 16e62c5 Merge pull request #8065 from tk0miya/8049_update_testcase
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 2
  • aioodbc Pool is incompatible with Python 3.10+

    aioodbc Pool is incompatible with Python 3.10+

    Python 3.10 changed the signature of the asyncio.Condition() class :

    Changed in version 3.10: Removed the loop parameter.

    The current aioodbc.Pool constructor uses the old signature which raises the TypeError: Condition.__init__() got an unexpected keyword argument 'loop' error.

    How to reproduce

    With Python 3.10 or 3.11, run the following code

    import asyncio
    import aioodbc
    
    
    loop = asyncio.get_event_loop()
    
    
    async def example_pool():
        dsn = 'Driver=SQLite;Database=sqlite.db'
        pool = await aioodbc.create_pool(dsn=dsn, loop=loop)
    
        async with pool.acquire() as conn:
            cur = await conn.cursor()
            await cur.execute("SELECT 42;")
            r = await cur.fetchall()
            print(r)
            await cur.close()
            await conn.close()
        pool.close()
        await pool.wait_closed()
    
    if __name__ == '__main__':
        loop.run_until_complete(example_pool())
    

    Actual result

    tmp.py:5: DeprecationWarning: There is no current event loop
      loop = asyncio.get_event_loop()
    Traceback (most recent call last):
      File "tmp.py", line 23, in <module>
        loop.run_until_complete(example_pool())
      File "C:\Program Files\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "tmp.py", line 10, in example_pool
        pool = await aioodbc.create_pool(dsn=dsn, loop=loop)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "\Lib\site-packages\aioodbc\pool.py", line 25, in _create_pool
        pool = Pool(minsize=minsize, maxsize=maxsize, echo=echo, loop=loop,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "\Lib\site-packages\aioodbc\pool.py", line 47, in __init__
        self._cond = asyncio.Condition(loop=loop)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: Condition.__init__() got an unexpected keyword argument 'loop'
    
    Process finished with exit code 1
    

    Expected result

    no error

    opened by thomasleveil 0
  • Fix pyodbc.ProgrammingError: Attempt to use a closed connection.

    Fix pyodbc.ProgrammingError: Attempt to use a closed connection.

    What do these changes do?

    Fix pyodbc.ProgrammingError in case of trying to close a connection, which was already closed

    Are there changes in behavior for the user?

    No

    Related issue number

    #379

    Checklist

    • [x] I think the code is well written
    • [ ] Unit tests for the changes exist - no tests required
    • [ ] Documentation reflects the changes - no changes required
    • [ ] Add a new news fragment into the CHANGES folder
      • name it <issue_id>.<type> (e.g. 588.bugfix)
      • if you don't have an issue_id change it to the pr id after creating the PR
      • ensure type is one of the following:
        • .feature: Signifying a new feature.
        • .bugfix: Signifying a bug fix.
        • .doc: Signifying a documentation improvement.
        • .removal: Signifying a deprecation or removal of public API.
        • .misc: A ticket has been closed, but it is not of interest to users.
      • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.
    opened by duh386 0
  • package dead?

    package dead?

    Apologies if this is not the place to ask, as I do not use Github often, but is this package dead?

    It looks like there are ~20 open issues, some pretty important, and the last closed issue was in 12/2020.

    opened by ConnorSMaynes 4
  • fix default value for cursor.fetchmany() parameter

    fix default value for cursor.fetchmany() parameter

    Add missing size = self.arraysize default value, as per spec and comments.

    What do these changes do?

    .fetchmany(size) should default the size parameter to cursor.arraysize if not supplied. The comments in the source code say as much but it is missing. This patch corrects this.

    Are there changes in behavior for the user?

    No changes, other than code that should have worked will now work as expected (rather than being syntactically incorrect.)

    Related issue number

    https://github.com/aio-libs/aioodbc/issues/377

    Checklist

    • [X ] I think the code is well written
    • [ ] Unit tests for the changes exist
    • [ X] Documentation reflects the changes - yes, no change required
    • [ ] Add a new news fragment into the CHANGES folder
      • name it <issue_id>.<type> (e.g. 588.bugfix)
      • if you don't have an issue_id change it to the pr id after creating the PR
      • ensure type is one of the following:
        • .feature: Signifying a new feature.
        • .bugfix: Signifying a bug fix.
        • .doc: Signifying a documentation improvement.
        • .removal: Signifying a deprecation or removal of public API.
        • .misc: A ticket has been closed, but it is not of interest to users.
      • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.
    opened by jpz 0
  • cursor.fetchmany() should have a default value for size, as per DB-API 2.0 spec

    cursor.fetchmany() should have a default value for size, as per DB-API 2.0 spec

    The default value is meant to be cursor.arraysize.

    https://www.python.org/dev/peps/pep-0249/#fetchmany

    The psycopg implementation here may be of use.

    https://github.com/psycopg/psycopg/blob/master/psycopg/psycopg/cursor.py#L607-L626

    opened by jpz 0
Releases(v0.3.3)
Owner
aio-libs
The set of asyncio-based libraries built with high quality
aio-libs
asyncio compatible driver for elasticsearch

asyncio client library for elasticsearch aioes is a asyncio compatible library for working with Elasticsearch The project is abandoned aioes is not su

97 Sep 05, 2022
A wrapper for SQLite and MySQL, Most of the queries wrapped into commands for ease.

Before you proceed, make sure you know Some real SQL, before looking at the code, otherwise you probably won't understand anything. Installation pip i

Refined 4 Jul 30, 2022
a small, expressive orm -- supports postgresql, mysql and sqlite

peewee Peewee is a simple and small ORM. It has few (but expressive) concepts, making it easy to learn and intuitive to use. a small, expressive ORM p

Charles Leifer 9.7k Dec 30, 2022
A tiny python web application based on Flask to set, get, expire, delete keys of Redis database easily with direct link at the browser.

First Redis Python (CRUD) A tiny python web application based on Flask to set, get, expire, delete keys of Redis database easily with direct link at t

Max Base 9 Dec 24, 2022
Toolkit for storing files and attachments in web applications

DEPOT - File Storage Made Easy DEPOT is a framework for easily storing and serving files in web applications on Python2.6+ and Python3.2+. DEPOT suppo

Alessandro Molina 139 Dec 25, 2022
A selection of SQLite3 databases to practice querying from.

Dummy SQL Databases This is a collection of dummy SQLite3 databases, for learning and practicing SQL querying, generated with the VS Code extension Ge

1 Feb 26, 2022
edaSQL is a library to link SQL to Exploratory Data Analysis and further more in the Data Engineering.

edaSQL is a python library to bridge the SQL with Exploratory Data Analysis where you can connect to the Database and insert the queries. The query results can be passed to the EDA tool which can giv

Tamil Selvan 8 Dec 12, 2022
Async database support for Python. đź—„

Databases Databases gives you simple asyncio support for a range of databases. It allows you to make queries using the powerful SQLAlchemy Core expres

Encode 3.2k Dec 30, 2022
SQL for Humans™

Records: SQL for Humans™ Records is a very simple, but powerful, library for making raw SQL queries to most relational databases. Just write SQL. No b

Ken Reitz 6.9k Jan 03, 2023
PyMongo - the Python driver for MongoDB

PyMongo Info: See the mongo site for more information. See GitHub for the latest source. Documentation: Available at pymongo.readthedocs.io Author: Mi

mongodb 3.7k Jan 08, 2023
Generate database table diagram from SQL data definition.

sql2diagram Generate database table diagram from SQL data definition. e.g. "CREATE TABLE ..." See Example below How does it works? Analyze the SQL to

django-cas-ng 1 Feb 08, 2022
python-beryl, a Python driver for BerylDB.

python-beryl, a Python driver for BerylDB.

BerylDB 3 Nov 24, 2021
Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.

dataset: databases for lazy people In short, dataset makes reading and writing data in databases as simple as reading and writing JSON files. Read the

Friedrich Lindenberg 4.2k Jan 02, 2023
A HugSQL-inspired database library for Python

PugSQL PugSQL is a simple Python interface for using parameterized SQL, in files. See pugsql.org for the documentation. To install: pip install pugsql

Dan McKinley 558 Dec 24, 2022
db.py is an easier way to interact with your databases

db.py What is it Databases Supported Features Quickstart - Installation - Demo How To Contributing TODO What is it? db.py is an easier way to interact

yhat 1.2k Jan 03, 2023
SQL for Humans™

Records: SQL for Humans™ Records is a very simple, but powerful, library for making raw SQL queries to most relational databases. Just write SQL. No b

Kenneth Reitz 6.9k Jan 07, 2023
pandas-gbq is a package providing an interface to the Google BigQuery API from pandas

pandas-gbq pandas-gbq is a package providing an interface to the Google BigQuery API from pandas Installation Install latest release version via conda

Google APIs 348 Jan 03, 2023
Python ODBC bridge

pyodbc pyodbc is an open source Python module that makes accessing ODBC databases simple. It implements the DB API 2.0 specification but is packed wit

Michael Kleehammer 2.6k Dec 27, 2022
Simple DDL Parser to parse SQL (HQL, TSQL, AWS Redshift, Snowflake and other dialects) ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc.

Simple DDL Parser Build with ply (lex & yacc in python). A lot of samples in 'tests/. Is it Stable? Yes, library already has about 5000+ usage per day

Iuliia Volkova 95 Jan 05, 2023
A Python Object-Document-Mapper for working with MongoDB

MongoEngine Info: MongoEngine is an ORM-like layer on top of PyMongo. Repository: https://github.com/MongoEngine/mongoengine Author: Harry Marr (http:

MongoEngine 3.9k Jan 08, 2023