semvec/pypi-packages huggingface dataset:
click-date-type 0.1.0
Date type parameter for click
Requires Python: >=3.7,<4.0

click-date-type
===============

Date type parameter for click

Installation
------------

To get the latest stable release from PyPi

.. code-block:: bash

    pip install click-date-type

Usage
-----

.. code-block:: python

    from click_date_type import Date

    @click.command()
    @click.option("--start_date", type=Date())
    def cli(start_date):
        click.echo(start_date.strftime("%Y-%m-%d"))
sqlalchemy-get-or-create 0.1.5
SQLAlchemy versions of Django's get_or_create() and update_or_create()
Requires Python: >=3.7,<4.0

SQLAlchemy get_or_create()
==========================

SQLAlchemy versions of Django's get_or_create() and update_or_create()

Installation
------------

To get the latest stable release from PyPi

.. code-block:: bash

    pip install sqlalchemy_get_or_create

Usage
-----

get_or_create(session, model, defaults=None, \*\*kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Same as Django's `get_or_create()` but also takes the SQLAlchemy session and model

update_or_create(session, model, defaults=None, \*\*kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Same as Django's `update_or_create()` but also takes the SQLAlchemy session and model

Acknowledgments
===============

#. Django
#. Some code cribbed from https://skien.cc/blog/2014/01/15/sqlalchemy-and-race-conditions-implementing-get_one_or_create/