diff --git a/doc/source/conf.py b/doc/source/conf.py index 4ebe1cc..07aacd6 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -21,13 +21,19 @@ } project = "Select AI for Python" -copyright = "2025, Oracle and/or its affiliates. All rights reserved." +copyright = "2026, Oracle and/or its affiliates. All rights reserved." author = "Oracle" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = ["sphinx.ext.autodoc", "sphinx_toolbox.latex"] +extensions = [ + "sphinx.ext.autodoc", + "sphinx_toolbox.latex", + "sphinx.ext.autosectionlabel", +] + +autosectionlabel_prefix_document = True # The suffix of source filenames. source_suffix = ".rst" diff --git a/doc/source/user_guide/connection.rst b/doc/source/user_guide/connection.rst index b03d556..9419c9d 100644 --- a/doc/source/user_guide/connection.rst +++ b/doc/source/user_guide/connection.rst @@ -42,6 +42,41 @@ with ``await`` keyword: await select_ai.async_connect(user=user, password=password, dsn=dsn) +Connection Pool +=============== + +You can create a connection pool using the ``select_ai.create_pool`` +and ``select_ai.create_pool_async`` methods + +.. code-block:: python + + import select_ai + + user = "" + password = "" + dsn = "" + + # for sync pool + select_ai.create_pool( + user=user, + password=password, + dsn=dsn, + min_size=5, + max_size=10, + increment=5 + ) + # for async pool + select_ai.create_pool_async( + user=user, + password=password, + dsn=dsn, + min_size=5, + max_size=10, + increment=5 + ) + +Check this `blog `__ which shows the benefit of connection pooling along with FastAPI service + .. note:: For m-TLS (wallet) based connection, additional parameters like diff --git a/doc/source/user_guide/provider.rst b/doc/source/user_guide/provider.rst index 2b587e5..c5e5a7f 100644 --- a/doc/source/user_guide/provider.rst +++ b/doc/source/user_guide/provider.rst @@ -87,8 +87,8 @@ for the supported providers Enable AI service provider ************************** -Sync API -++++++++ +Enable using Sync API ++++++++++++++++++++++ This method adds ACL allowing database users to invoke AI provider's HTTP endpoint @@ -103,8 +103,8 @@ output:: .. latex:clearpage:: -Async API -+++++++++ +Enable using Async API +++++++++++++++++++++++ .. literalinclude:: ../../../samples/async/enable_ai_provider.py :language: python :lines: 14- @@ -122,8 +122,8 @@ Disable AI service provider This method removes ACL blocking database users to invoke AI provider's HTTP endpoint -Sync API -++++++++ +Disable using Sync API +++++++++++++++++++++++ .. literalinclude:: ../../../samples/disable_ai_provider.py :language: python @@ -135,8 +135,8 @@ output:: .. latex:clearpage:: -Async API -+++++++++ +Disable using Async API ++++++++++++++++++++++++ .. literalinclude:: ../../../samples/async/disable_ai_provider.py :language: python diff --git a/doc/source/user_guide/synthetic_data.rst b/doc/source/user_guide/synthetic_data.rst index 97e2272..4e4170d 100644 --- a/doc/source/user_guide/synthetic_data.rst +++ b/doc/source/user_guide/synthetic_data.rst @@ -27,8 +27,8 @@ Single table synthetic data The below example shows single table synthetic data generation -Sync API -++++++++ +Single Table Sync API ++++++++++++++++++++++ .. literalinclude:: ../../../samples/profile_gen_single_table_synthetic_data.py :language: python @@ -44,8 +44,8 @@ output:: .. latex:clearpage:: -Async API -+++++++++ +Singe Table Async API ++++++++++++++++++++++ .. literalinclude:: ../../../samples/async/profile_gen_single_table_synthetic_data.py :language: python @@ -68,8 +68,8 @@ Multi table synthetic data The below example shows multitable synthetic data generation -Sync API -++++++++ +Multi table Sync API +++++++++++++++++++++ .. literalinclude:: ../../../samples/profile_gen_multi_table_synthetic_data.py :language: python @@ -97,8 +97,8 @@ output:: 300 -Async API -+++++++++ +Multi table Async API ++++++++++++++++++++++ .. literalinclude:: ../../../samples/async/profile_gen_multi_table_synthetic_data.py diff --git a/docs/.buildinfo b/docs/.buildinfo index c40577e..d21919a 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file records the configuration used when building these files. When it is not found, a full rebuild will be done. -config: b87d5f8ed0634472678ff572d56d38cc +config: 04c93cb781f3bb6be839c34359e8a2a4 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_sources/user_guide/connection.rst.txt b/docs/_sources/user_guide/connection.rst.txt index b03d556..9419c9d 100644 --- a/docs/_sources/user_guide/connection.rst.txt +++ b/docs/_sources/user_guide/connection.rst.txt @@ -42,6 +42,41 @@ with ``await`` keyword: await select_ai.async_connect(user=user, password=password, dsn=dsn) +Connection Pool +=============== + +You can create a connection pool using the ``select_ai.create_pool`` +and ``select_ai.create_pool_async`` methods + +.. code-block:: python + + import select_ai + + user = "" + password = "" + dsn = "" + + # for sync pool + select_ai.create_pool( + user=user, + password=password, + dsn=dsn, + min_size=5, + max_size=10, + increment=5 + ) + # for async pool + select_ai.create_pool_async( + user=user, + password=password, + dsn=dsn, + min_size=5, + max_size=10, + increment=5 + ) + +Check this `blog `__ which shows the benefit of connection pooling along with FastAPI service + .. note:: For m-TLS (wallet) based connection, additional parameters like diff --git a/docs/_sources/user_guide/provider.rst.txt b/docs/_sources/user_guide/provider.rst.txt index 2b587e5..c5e5a7f 100644 --- a/docs/_sources/user_guide/provider.rst.txt +++ b/docs/_sources/user_guide/provider.rst.txt @@ -87,8 +87,8 @@ for the supported providers Enable AI service provider ************************** -Sync API -++++++++ +Enable using Sync API ++++++++++++++++++++++ This method adds ACL allowing database users to invoke AI provider's HTTP endpoint @@ -103,8 +103,8 @@ output:: .. latex:clearpage:: -Async API -+++++++++ +Enable using Async API +++++++++++++++++++++++ .. literalinclude:: ../../../samples/async/enable_ai_provider.py :language: python :lines: 14- @@ -122,8 +122,8 @@ Disable AI service provider This method removes ACL blocking database users to invoke AI provider's HTTP endpoint -Sync API -++++++++ +Disable using Sync API +++++++++++++++++++++++ .. literalinclude:: ../../../samples/disable_ai_provider.py :language: python @@ -135,8 +135,8 @@ output:: .. latex:clearpage:: -Async API -+++++++++ +Disable using Async API ++++++++++++++++++++++++ .. literalinclude:: ../../../samples/async/disable_ai_provider.py :language: python diff --git a/docs/_sources/user_guide/synthetic_data.rst.txt b/docs/_sources/user_guide/synthetic_data.rst.txt index 97e2272..4e4170d 100644 --- a/docs/_sources/user_guide/synthetic_data.rst.txt +++ b/docs/_sources/user_guide/synthetic_data.rst.txt @@ -27,8 +27,8 @@ Single table synthetic data The below example shows single table synthetic data generation -Sync API -++++++++ +Single Table Sync API ++++++++++++++++++++++ .. literalinclude:: ../../../samples/profile_gen_single_table_synthetic_data.py :language: python @@ -44,8 +44,8 @@ output:: .. latex:clearpage:: -Async API -+++++++++ +Singe Table Async API ++++++++++++++++++++++ .. literalinclude:: ../../../samples/async/profile_gen_single_table_synthetic_data.py :language: python @@ -68,8 +68,8 @@ Multi table synthetic data The below example shows multitable synthetic data generation -Sync API -++++++++ +Multi table Sync API +++++++++++++++++++++ .. literalinclude:: ../../../samples/profile_gen_multi_table_synthetic_data.py :language: python @@ -97,8 +97,8 @@ output:: 300 -Async API -+++++++++ +Multi table Async API ++++++++++++++++++++++ .. literalinclude:: ../../../samples/async/profile_gen_multi_table_synthetic_data.py diff --git a/docs/_static/copybutton.js b/docs/_static/copybutton.js index e1ad458..f90eb1e 100644 --- a/docs/_static/copybutton.js +++ b/docs/_static/copybutton.js @@ -62,6 +62,12 @@ const loadCopyButton = () => { + ".highlight-python3 .highlight," + ".highlight-pycon .highlight," + ".highlight-pycon3 .highlight," + + ".highlight-bash .highlight," + + ".highlight-console .highlight," + + ".highlight-doscon .highlight," + + ".highlight-ps1con .highlight," + + ".highlight-sh .highlight," + + ".highlight-shell-session .highlight," + ".highlight-default .highlight" ) diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 73b9b36..0ec80b7 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '1.2.2', + VERSION: '1.3.0', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/_static/pydoctheme.css b/docs/_static/pydoctheme.css index ec2d285..7167add 100644 --- a/docs/_static/pydoctheme.css +++ b/docs/_static/pydoctheme.css @@ -247,6 +247,25 @@ div.body { } } +div.code-block-caption { + background-color: #eee; + border: 1px solid #ac9; + border-bottom: none; + border-radius: 3px 3px 0 0; + padding: 0.3em 0.6em; + font-size: 90%; + color: #333; + + & + div pre { + border-top-left-radius: 0 !important; + border-top-right-radius: 0 !important; + } + + & + div .copybutton { + border-top-right-radius: 0 !important; + } +} + /* Admonitions */ :root { --admonition-background: #eee; @@ -425,6 +444,36 @@ div.footer a:hover { color: #229; } +/* C API thread safety annotations */ +:root { + --threadsafety-incompatible: var(--bad-color); + --threadsafety-compatible: var(--middle-color); + --threadsafety-distinct: var(--middle-color); + --threadsafety-shared: var(--good-color); + --threadsafety-atomic: var(--good-color); +} + +.threadsafety.threadsafety-incompatible { + color: var(--threadsafety-incompatible); +} + +.threadsafety.threadsafety-compatible { + color: var(--threadsafety-compatible); +} + +.threadsafety.threadsafety-distinct { + color: var(--threadsafety-distinct); +} + +.threadsafety.threadsafety-shared { + color: var(--threadsafety-shared); +} + +.threadsafety.threadsafety-atomic { + color: var(--threadsafety-atomic); +} + + dl > dt span ~ em, .sig { font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; diff --git a/docs/_static/pydoctheme_dark.css b/docs/_static/pydoctheme_dark.css index 582e4dd..909a296 100644 --- a/docs/_static/pydoctheme_dark.css +++ b/docs/_static/pydoctheme_dark.css @@ -97,6 +97,12 @@ div.body pre { border-color: #616161; } +div.code-block-caption { + background-color: #333; + border-color: #616161; + color: white; +} + code { background-color: #424242; } diff --git a/docs/genindex.html b/docs/genindex.html index 8385dd2..dc41ad6 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -4,14 +4,14 @@ - Index — Select AI for Python 1.2.2 documentation + Index — Select AI for Python 1.3.0 documentation - + - + @@ -85,7 +85,7 @@

Navigation

  • - Select AI for Python 1.2.2 documentation » + Select AI for Python 1.3.0 documentation »
  • @@ -223,6 +223,8 @@

    C

  • (select_ai.agent.AsyncTask method)
  • (select_ai.agent.AsyncTeam method) +
  • +
  • (select_ai.agent.AsyncTool method)
  • (select_ai.agent.Task method)
  • @@ -495,6 +497,12 @@

    G

    @@ -236,13 +237,13 @@

    Provider
  • 10. Enable AI service provider
  • 11. Disable AI service provider
  • @@ -275,12 +276,12 @@

    Profile Attributes