semvec/pypi-packages huggingface dataset:
mbonig-rds-tools 2.1.0
A construct for working with RDS SQL servers
License: MIT
Requires Python: ~=3.9

# RDS Tools

<!--BEGIN STABILITY BANNER-->---


![cdk-constructs: Developer Preview](https://img.shields.io/badge/cdk--constructs-developer--preview-informational.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are in **developer preview** before they
> become stable. We will only make breaking changes to address unforeseen API issues. Therefore,
> these APIs are not subject to [Semantic Versioning](https://semver.org/), and breaking changes
> will be announced in release notes. This means that while you may use them, you may need to
> update your source code when upgrading to a newer version of this package.

---


There are multiple versions of this library published. You should be using the v0.X.X versions for now.
There are versions published that match the CDK version they depend on, but don't use those.

<!--END STABILITY BANNER-->

This is a collection of CDK constructs you can use with RDS.

![Developer Preview](https://img.shields.io/badge/developer--preview-informational.svg?style=for-the-badge)

# DatabaseScript

Provides a Custom Resource and backing Lambda Function that will run a given script against a given database.

```python
const databaseInstance = new DatabaseInstance(stack, 'test-database', {
  engine: DatabaseInstanceEngine.sqlServerWeb({ version: SqlServerEngineVersion.VER_15_00_4043_16_V1 }),
  vpc: vpc,
});


const databaseScript = new DatabaseScript(stack2, 'test', {
  databaseInstance,
  script: 'SELECT 1',
})

// Allow the script to connect to the database
databaseInstance.connections.allowDefaultPortFrom(databaseScript);

// Make sure the script runs after the database is created
databaseScript.node.addDependency(databaseInstance);
```

# DatabaseUser

There was once a construct called DatabaseUser. However, it is better to use the standard code from the CDK directly:

```python
const myUserSecret = new rds.DatabaseSecret(this, 'MyUserSecret', {
  username: 'myuser',
  masterSecret: instance.secret,
  excludeCharacters: '{}[]()\'"/\\', // defaults to the set " %+~`#$&*()|[]{}:;<>?!'/@\"\\"
});
const myUserSecretAttached = myUserSecret.attach(instance); // Adds DB connections information in the secret
instance.addRotationMultiUser('MyUser', { // Add rotation using the multi user scheme
  secret: myUserSecretAttached,
});
```
jbang 0.8.0
Python for JBang - Java Script in your Python
License: MIT

# jbang-python - Java Script in your Python

Install and use [JBang](https://www.jbang.dev) from Python-based projects.

![](https://github.com/jbangdev/jbang-python/blob/main/python_jbang.png?raw=true)

Lets you use your own local scripts, [JBang AppStore](https://jbang.dev/appstore) alias or any network reachable jar or Maven artifact.

## Usage

You can run the package in two ways:

### 1. Using the console script

After installation, you can use the `jbang-python` command:

```bash
jbang-python properties@jbangdev
```

### 2. Using Python's module runner

You can also run the package directly using Python's module runner:

```bash
python -m jbang properties@jbangdev
```

Or with `uvx`:

```bash
uvx run -m jbang properties@jbangdev
```

### Command-line Arguments

You can easily pass command-line arguments around:

```python
import sys
args = ' '.join(sys.argv[1:])
jbang.exec('com.myco.mylib:RELEASE ' + args)
```

So now if you run `python test.py arg1 arg2`, `arg1 arg2` will be appended to the command executed.

## Behind the scenes

When you run `pip install` - JBang and other dependencies will be installed. This uses the [`app setup`](https://www.jbang.dev/documentation/guide/latest/installation.html#using-jbang) command.

Opening a new terminal or shell may be required to be able to use the `jbang` command from the system `PATH`.

## Improvements ?

This was made as a quick hack to see if it was possible to use JBang from Python based on jbang-npm. If you have any ideas on how to improve this, please open an issue or PR and lets see where this brings us.

## Similar projects

* [jgo](https://pypi.org/project/jgo/) - allows execution of Maven artifacts by using Maven.