semvec/pypi-packages huggingface dataset:
replace_me 0.1.4
Modify your own source code with this piece of Python black magic
License: MIT

Modify your own source code with this piece of Python black magic.

When a piece of code calls ``replace_me(value)``, that line will be
replaced with the given ``value``. If you want to insert a comment and
keep the line that inserted it, use ``insert_comment(value)``.

**ATTENTION**: Calling these functions will modify your source code.
Keep backups.

Example:

::

    from replace_me import replace_me, insert_comment

    # If you run this program, this source code will change.

    # These two lines will become the same:
    # Hello World
    replace_me("Hello World", as_comment=True)

    # Code generation. Creates a hard coded list of 100 numbers.
    replace_me('numbers = ' + str(list(range(100))))

    import random
    # The next comment will be replaced with a random number.
    insert_comment(random.randint(1, 10))
    # ??

    # Pseudo-quine, replaces the line with itself.
    quine = 'replace_me(quine)'
    replace_me(quine)
Broadway-Migrate 0.0.1
A set of tools to reduce the boilerplate code in Flask apps
License: MIT

broadway-migrate
=================

A broadway_ extension for Flask-Migrate_.

For more information check the Documentation_.

Example
-------

.. code:: python

    # app.py
    import broadway

    from broadway_migrate import extension as db

    factory = broadway.factory()

    factory.add_extension([
        'broadway_sqlalchemy',
        'broadway_migrate'
    ])

    class User(db.Model):
        id = db.Column(db.Integer, primary_key=True)
        username = db.Column(db.String(80), unique=True)
        email = db.Column(db.String(120), unique=True)

    def __init__(self, username, email):
        self.username = username
        self.email = email

    def __repr__(self):
        return '<User %r>' % self.username

    application = factory(__name__)

::

    $ export SQLALCHEMY_DATABASE_URI=sqlite:////tmp/test.db
    $ export FLASK_APP=app.py
    $ flask db init
    $ flask db migrate
    $ flask db upgrade

Install
-------

To install broadway-migrate via pip:

::

    pip install broadway-migrate

Source
------

To install from source:

::

    git clone git://github.com/artisanofcode/python-broadway-migrate.git
    cd python-broadway-migrate
    python setup.py develop


History
-------

See `CHANGES <CHANGES>`_

Licence
-------

This project is licensed under the `MIT licence`_.

Meta
----

This project uses `Semantic Versioning`_.

.. _broadway: http://broadway.craftedbyartisans.com/
.. _Flask-Migrate: http://flask-migrate.readthedocs.io/
.. _Documentation: http://broadway-migrate.craftedbyartisans.com/
.. _Semantic Versioning: http://semver.org/
.. _MIT Licence: http://dan.mit-license.org/