noora


Namenoora JSON
Version 1.2.3 PyPI version JSON
download
home_pagehttps://github.com/janripke/noora
SummaryNoOra a database deployment tool.
upload_time2023-01-13 15:04:39
maintainerJan Ripke
docs_urlNone
authorJan Ripke
requires_python
licenseApache License 2.0
keywords development database
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ![noora logo](https://a.fsdn.com/allura/p/noora/icon)

[![Join the chat at https://gitter.im/noora_cli/Lobby](https://badges.gitter.im/noora_cli/Lobby.svg)](https://gitter.im/noora_cli/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# Welcome to Noora
Noora is a deployment tool for automating the database deployment cycle. It allows you to organize your database structure, do versioning on your data model, set up environments and generate self-contained Python packages that can deploy your structure to a server.

Noora was created with the DevOps paradigm in mind; especially when as a team you manage many database models it enables you to standardize your DDL and streamline development, testing, acceptance and deployment in production.

NOTE: This project is currently split across two branches, where Noora 1.1.0 provides MySQL and MSSQL support using Python 2 and 3 and Noora 1.0.2 supports Oracle and MySQL using Python 2 only. This documentation describes Noora >= 1.1.

Noora is released under the [Apache License 2.0](LICENSE).


# Quick Start
To install Noora, you can install from pip, a release from Github or from source::

```
# Install from PyPi
$ pip install noora

# Install from github
$ pip install git+https://github.com/janripke/noora.git@1.2.1#egg=noora

# Clone and install from source
$ git clone https://github.com/janripke/noora/
$ cd noora
# Checkout the release you want to use 
# (NOTE: the master branch is NOT guaranteed to be stable!)
$ git checkout tags/1.2.1
$ pip install .
```

We'll set up a MySQL project, so first make sure to create a user and database for your project:

```
$> mysql -u root
mysql> create database acme;
mysql> create user apps@'localhost' identified by 'apps';
mysql> grant all on acme.* to apps@'localhost';
mysql> -- This is currently required to be able to drop functions and procedures, to be fixed
mysql> grant select, delete on mysql.proc to apps@'localhost';
mysql> flush privileges;
```

Then, on the command line create your project:

```
$ mynoora generate -t=mysql
Host [localhost]:
Port [3306]:
Database name: acme
Database username: apps
Database password:
Repeat for confirmation:
Initial project version [1.0.0]:
version 1.0.0 created.
```

Add a table and some data to your newly created project:

```
$ echo "CREATE TABLE hello ( value VARCHAR(128) );" > acme-db/create/acme/ddl/tab/hello.sql
$ echo "INSERT INTO hello SET value='world';" > acme-db/create/acme/dat/hello.sql
```

Now, let's deploy the project and see what happens:

```
$ cd acme-db
$ mynoora create -h=localhost
creating database 'acme' on host 'localhost' using environment 'dev'
/home/niels/tmp/acme-db/create/acme/ddl/tab/application_properties.sql
/home/niels/tmp/acme-db/create/acme/ddl/tab/hello.sql
/home/niels/tmp/acme-db/create/acme/ddl/fct/get_property.sql
/home/niels/tmp/acme-db/create/acme/ddl/trg/application_properties_bi.sql
/home/niels/tmp/acme-db/create/acme/ddl/trg/application_properties_bu.sql
/home/niels/tmp/acme-db/create/acme/ddl/idx/application_properties.sql
/home/niels/tmp/acme-db/create/acme/dat/hello.sql
/home/niels/tmp/acme-db/create/acme/dat/version.sql
/home/niels/tmp/acme-db/create/acme/dat/dev/environment.sql
database 'acme' created.
```

You can verify that the table you added along with some default data was deployed, and that the current version of your database model is 1.0.0 in the 'dev' environment: 

```
$ mysql -uapps -p acme
Enter password:
mysql> select * from hello;
+--------+
| value  |
+--------+
| world; |
+--------+
1 row in set (0.00 sec)

mysql> select get_property('application.version');
+-------------------------------------+
| get_property('application.version') |
+-------------------------------------+
| 1.0.0                               |
+-------------------------------------+
1 row in set (0.00 sec)
```

That's it! To learn more about Noora projects, check out http://noora.readthedocs.org/getting-started. For now, you can clear out your database like this::

```
$ mynoora drop -h=localhost
dropping database 'acme' on host 'localhost' using environment 'dev'
/home/niels/projects/noora/noora/plugins/mysql/drop/vw/drop_views.sql
/home/niels/projects/noora/noora/plugins/mysql/drop/tab/drop_foreign_keys.sql
/home/niels/projects/noora/noora/plugins/mysql/drop/prc/drop_procedures.sql
/home/niels/projects/noora/noora/plugins/mysql/drop/fct/drop_functions.sql
database 'acme' dropped.
```

Note that this does not actually drop the database itself, rather it removes all objects, including views and procedures.


# Next Steps

Check out the documentation over at http://noora.readthedocs.org/

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/janripke/noora",
    "name": "noora",
    "maintainer": "Jan Ripke",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "janripke@gmail.com",
    "keywords": "development database",
    "author": "Jan Ripke",
    "author_email": "janripke@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/90/c6/684b2b0b207cc55e2e3796ad0ad24f56060e93bdda9d631249f2ba593471/noora-1.2.3.tar.gz",
    "platform": null,
    "description": "# ![noora logo](https://a.fsdn.com/allura/p/noora/icon)\n\n[![Join the chat at https://gitter.im/noora_cli/Lobby](https://badges.gitter.im/noora_cli/Lobby.svg)](https://gitter.im/noora_cli/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n# Welcome to Noora\nNoora is a deployment tool for automating the database deployment cycle. It allows you to organize your database structure, do versioning on your data model, set up environments and generate self-contained Python packages that can deploy your structure to a server.\n\nNoora was created with the DevOps paradigm in mind; especially when as a team you manage many database models it enables you to standardize your DDL and streamline development, testing, acceptance and deployment in production.\n\nNOTE: This project is currently split across two branches, where Noora 1.1.0 provides MySQL and MSSQL support using Python 2 and 3 and Noora 1.0.2 supports Oracle and MySQL using Python 2 only. This documentation describes Noora >= 1.1.\n\nNoora is released under the [Apache License 2.0](LICENSE).\n\n\n# Quick Start\nTo install Noora, you can install from pip, a release from Github or from source::\n\n```\n# Install from PyPi\n$ pip install noora\n\n# Install from github\n$ pip install git+https://github.com/janripke/noora.git@1.2.1#egg=noora\n\n# Clone and install from source\n$ git clone https://github.com/janripke/noora/\n$ cd noora\n# Checkout the release you want to use \n# (NOTE: the master branch is NOT guaranteed to be stable!)\n$ git checkout tags/1.2.1\n$ pip install .\n```\n\nWe'll set up a MySQL project, so first make sure to create a user and database for your project:\n\n```\n$> mysql -u root\nmysql> create database acme;\nmysql> create user apps@'localhost' identified by 'apps';\nmysql> grant all on acme.* to apps@'localhost';\nmysql> -- This is currently required to be able to drop functions and procedures, to be fixed\nmysql> grant select, delete on mysql.proc to apps@'localhost';\nmysql> flush privileges;\n```\n\nThen, on the command line create your project:\n\n```\n$ mynoora generate -t=mysql\nHost [localhost]:\nPort [3306]:\nDatabase name: acme\nDatabase username: apps\nDatabase password:\nRepeat for confirmation:\nInitial project version [1.0.0]:\nversion 1.0.0 created.\n```\n\nAdd a table and some data to your newly created project:\n\n```\n$ echo \"CREATE TABLE hello ( value VARCHAR(128) );\" > acme-db/create/acme/ddl/tab/hello.sql\n$ echo \"INSERT INTO hello SET value='world';\" > acme-db/create/acme/dat/hello.sql\n```\n\nNow, let's deploy the project and see what happens:\n\n```\n$ cd acme-db\n$ mynoora create -h=localhost\ncreating database 'acme' on host 'localhost' using environment 'dev'\n/home/niels/tmp/acme-db/create/acme/ddl/tab/application_properties.sql\n/home/niels/tmp/acme-db/create/acme/ddl/tab/hello.sql\n/home/niels/tmp/acme-db/create/acme/ddl/fct/get_property.sql\n/home/niels/tmp/acme-db/create/acme/ddl/trg/application_properties_bi.sql\n/home/niels/tmp/acme-db/create/acme/ddl/trg/application_properties_bu.sql\n/home/niels/tmp/acme-db/create/acme/ddl/idx/application_properties.sql\n/home/niels/tmp/acme-db/create/acme/dat/hello.sql\n/home/niels/tmp/acme-db/create/acme/dat/version.sql\n/home/niels/tmp/acme-db/create/acme/dat/dev/environment.sql\ndatabase 'acme' created.\n```\n\nYou can verify that the table you added along with some default data was deployed, and that the current version of your database model is 1.0.0 in the 'dev' environment: \n\n```\n$ mysql -uapps -p acme\nEnter password:\nmysql> select * from hello;\n+--------+\n| value  |\n+--------+\n| world; |\n+--------+\n1 row in set (0.00 sec)\n\nmysql> select get_property('application.version');\n+-------------------------------------+\n| get_property('application.version') |\n+-------------------------------------+\n| 1.0.0                               |\n+-------------------------------------+\n1 row in set (0.00 sec)\n```\n\nThat's it! To learn more about Noora projects, check out http://noora.readthedocs.org/getting-started. For now, you can clear out your database like this::\n\n```\n$ mynoora drop -h=localhost\ndropping database 'acme' on host 'localhost' using environment 'dev'\n/home/niels/projects/noora/noora/plugins/mysql/drop/vw/drop_views.sql\n/home/niels/projects/noora/noora/plugins/mysql/drop/tab/drop_foreign_keys.sql\n/home/niels/projects/noora/noora/plugins/mysql/drop/prc/drop_procedures.sql\n/home/niels/projects/noora/noora/plugins/mysql/drop/fct/drop_functions.sql\ndatabase 'acme' dropped.\n```\n\nNote that this does not actually drop the database itself, rather it removes all objects, including views and procedures.\n\n\n# Next Steps\n\nCheck out the documentation over at http://noora.readthedocs.org/\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "NoOra a database deployment tool.",
    "version": "1.2.3",
    "split_keywords": [
        "development",
        "database"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "65ea3d04d13245c8aa2bb4939d4c3cc03f7af7fd925ddd0db104bfbf0d0ea53e",
                "md5": "690a99b1a876ddbdafac79a815aa0d47",
                "sha256": "287c7b92764f4cd6cee89801834e80041546851c4417d9d38ab36fc68e2aed7a"
            },
            "downloads": -1,
            "filename": "noora-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "690a99b1a876ddbdafac79a815aa0d47",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 83959,
            "upload_time": "2023-01-13T15:04:37",
            "upload_time_iso_8601": "2023-01-13T15:04:37.737003Z",
            "url": "https://files.pythonhosted.org/packages/65/ea/3d04d13245c8aa2bb4939d4c3cc03f7af7fd925ddd0db104bfbf0d0ea53e/noora-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90c6684b2b0b207cc55e2e3796ad0ad24f56060e93bdda9d631249f2ba593471",
                "md5": "df83721eecbcb6df8feb476f8e07e71d",
                "sha256": "05bdafdca111f5fe8b0c228307260c28eb4176d54a3b6837ad7c8f13d488e40e"
            },
            "downloads": -1,
            "filename": "noora-1.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "df83721eecbcb6df8feb476f8e07e71d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 49117,
            "upload_time": "2023-01-13T15:04:39",
            "upload_time_iso_8601": "2023-01-13T15:04:39.353513Z",
            "url": "https://files.pythonhosted.org/packages/90/c6/684b2b0b207cc55e2e3796ad0ad24f56060e93bdda9d631249f2ba593471/noora-1.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-13 15:04:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "janripke",
    "github_project": "noora",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "noora"
}
        
Elapsed time: 0.07987s