Metadata-Version: 2.1
Name: neulabs-cdk-constructs
Version: 0.1.7
Summary: neulabs-cdk-constructs
Home-page: https://github.com/neulabscom/neulabs-cdk-constructs.git
Author: Neulabs<tech@neulabs.com>
License: Apache-2.0
Project-URL: Source, https://github.com/neulabscom/neulabs-cdk-constructs.git
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Typing :: Typed
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved
Requires-Python: ~=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# Neulabs CDK Constructs

[![NPM](https://img.shields.io/npm/v/neulabs-cdk-constructs?color=blue&label=npm+cdk)](https://www.npmjs.com/package/neulabs-cdk-constructs)
[![PyPI](https://img.shields.io/pypi/v/neulabs-cdk-constructs?color=blue&label=pypi+cdk)](https://pypi.org/project/neulabs-cdk-constructs/)
[![PyPI](https://img.shields.io/github/last-commit/neulabscom/neulabs-cdk-constructs/main)](https://github.com/neulabscom/neulabs-cdk-constructs/commits/main)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/neulabscom/neulabs-cdk-constructs/blob/main/LICENSE)

The neulabs-cdk-constructs library contains CDK-based constructs and stacks to allow the creation of cloud infrastructure on AWS.

The purpose of the library is to expose modules that can facilitate the creation and maintenance of the infrastructure as code.

Inside you will find generic stacks that allow the creation of services by simply instantiating a class, or constructs that implement logic to facilitate the developer and many other aspects.

We decided to develop it in Typescript, using projen for repository management, and the JSII library to be able to compile the neulabs-cdk-constructs package into multiple languages.

## Usage

**Package Installation (npm)**:

```
yarn add neulabs-cdk-constructs
# or
npm install neulabs-cdk-constructs
```

**Package Installation (python)**:

```
pip install neulabs-cdk-constructs
```

**Examples**

Stack for integration between AWS and New Relic.

File `app.py`

```
import aws_cdk as cdk

from neulabs_cdk_constructs.stacks.monitoring.newrelic import EndpointUrlLogs
from neulabs_cdk_constructs.stacks.monitoring.newrelic import EndpointUrlMetrics
from neulabs_cdk_constructs.stacks.monitoring.newrelic import NewRelicStack

app = cdk.App()

environment = cdk.Environment(
    account=os.getenv('CDK_DEFAULT_ACCOUNT'),
    region=os.getenv('CDK_DEFAULT_REGION'),
)

stage = os.getenv('ENVIRONMENT', 'develop')
new_relic_account_id = os.getenv('NEW_RELIC_ACCOUNT_ID')
new_relic_license_key = os.getenv('NEW_RELIC_LICENSE_KEY')

new_relic_stack = NewRelicStack(
    app,
    'NewRelicStack',
    env=environment,
    stage=stage,
    new_relic_bucket_name=f'neulabs-newrelic-{stage}',
    new_relic_account_id=new_relic_account_id,
    new_relic_license_key=new_relic_license_key,
    new_relic_api_url_metrics=EndpointUrlMetrics.EU_METRICS,
    new_relic_api_url_logs=EndpointUrlLogs.EU_LOGS,
)
```

### Contributors

<a href="https://github.com/neulabscom/neulabs-cdk-constructs/graphs/contributors"> <img src="https://contrib.rocks/image?repo=neulabscom/neulabs-cdk-constructs" /> </a>

### License

See the `LICENSE` file for more information.


