semvec/pypi-packages huggingface dataset:
astronomer-migration-provider 0.1.7
Migration operators to assist moving variables, connections to Astronomer Cloud
Requires Python: <4,>=3.7

Astronomer Migration Provider
=============================

Apache Airflow Provider containing Operators from Astronomer. The purpose of these operators is to better assist customers migrating to Astronomer hosted Airflow environments from MWAA, GCC, OSS. This provider is meant for MWAA 2.0.2 and Composer 1 since the plugin methods are unavailable.

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

Install and update using `pip <https://pip.pypa.io/en/stable/getting-started/>`_:

.. code-block:: bash

    pip install astronomer-migration-provider



Starship
========

Starship is an Astronomer utility that assist end users with migrating Variables, Connections, and Environment Variables from their source Airflow environments to an Astronomer environment.

Usage
-----
1. Add the following line to your ``requirements.txt`` in your source environment:

.. code-block:: bash

    astronomer-migration-provider

2. Add the following DAG to your source environment:

.. code-block:: python

   from airflow import DAG

   from astronomer.migration.operators import AstroMigrationOperator
   from datetime import datetime

   with DAG(
      dag_id="astronomer_migration_dag",
      start_date=datetime(2020, 8, 15),
      schedule_interval=None,
   ) as dag:

      AstroMigrationOperator(
          task_id='export_meta',
          deployment_url='{{ dag_run.conf["deployment_url"] }}',
          token='{{ dag_run.conf["astro_token"] }}',
      )

3. Deploy this DAG to your source Airflow environment, configured as described in the section below
4. Hit the Trigger DAG button in the Airflow UI when the DAG appears, and input the following in the configuration dictionary:
   - ``astro_token``:  To get user token for astronomer navigate to `cloud.astronomer.io/token <https://cloud.astronomer.io/token>`_ and login using your Astronomer credentials
   - ``deployment_url``: To retrieve a deployment URL - navigate to the deployment that you'd like to migrate to in the Astronomer UI, click ``Open Airflow`` and copy the page URL (excluding ``/home`` on the end of the URL)

5. Once the DAG successfully runs, your connections, variables, and environment variables should all be migrated to Astronomer

Configuration
--------------
The `AstroMigrationOperator` can be configured as follows:
-  You can update the list of environment variable names under the ``env_include_list`` parameter that need to be migrated to Astronomer. None are migrated by default.
- if there are any Airflow Variables or Airflow Connections that should NOT be migrated, add them to the ``variable_exclude_list`` & ``connection_exclude_list`` parameters.

.. code-block:: python

      AstroMigrationOperator(
          task_id='export_meta',
          deployment_url='{{ dag_run.conf["deployment_url"] }}',
          token='{{ dag_run.conf["astro_token"] }}',
          variables_exclude_list=["deployment_url", "astro_token"],
          connection_exclude_list=["some_conn_1"],
          env_include_list=["FOO", "BAR"]
      )
QuestionsParser 1.0.1
A Python package for parsing questions from pdf files.

# Questions Parser
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://choosealicense.com/licenses/mit/)
[![PyPI version](https://img.shields.io/pypi/v/QuestionsParser)](https://pypi.org/project/QuestionsParser/)

**This is a simple parser for questions about Java and OOP from PDF files.**

## Usage

1. Install the package with 

```bash
pip install QuestionsParser
```

or using GitHub installation:
```bash
pip install git+https://github.com/andylvua/QuestionsParser
```

2. Parser usage example:

```python
from QuestionsParser import QuestionsParser # import the parser class

parser = QuestionsParser("Questions.pdf") # create an instance of the parser and pass the PDF file with questions
answers = parser.parse_google() # parse the questions and get the answers from Google
answers.write_to_file("Answers.docx") # write the answers to a .docx file
```

> **Note** 
> 
> The parser uses Google to get the answers, so you need to have an active internet connection. 
> The process of getting the answers can take a while, so be patient.


## Options

The parser has several options that can be passed to the constructor and it's methods:

* `remainder_mod` and `questions_range` parameters of `QuestionsParser`.

`remainder_mod` is a tuple of two integers, the remainder and the divisor respectively. 
For example, if `remainder_mod = (2, 5)`, then the parser will parse only the questions 
with the remainder of 2 when divided by 5. Default value is `(0, 1)`, which means that all questions will be parsed.

`questions_range` is a tuple of two integers, the first and the last questions respectively.

```python
QuestionsParser(
    file_path: str,
    remainder_mod: tuple = (0, 1),
    questions_range: tuple = None,
)
```

* `parse_google` method of `QuestionsParser` - `autoparse_answers` parameter. If set to `False`, parser will not parse 
the answers from Google, but will still provide the useful links instead. Default value is `True`.

```python
QuestionsParser.parse_google(
    autoparse_answers: bool = True,
)
```

* `write_to_file` method of `QuestionsParser` - `path_to_file` and `header` parameters. 
`path_to_file` is the path to the file where the answers will be written. 
`header` is the header of the file. Default value is `Answers`. 
This method couldn't be used before calling `parse_google` method.

```python
QuestionsParser.write_to_file(
    path_to_file: str,
    header: str = "Answers",
)
```

> **Note**
> 
> It's recommended to write the answers to a .docx file, as it provides better readability 
> and is more convenient than a .pdf file. However, .pdf files are also supported.

## Example

**Here is an example of the output document:**

<img width="976" alt="image" src="https://user-images.githubusercontent.com/93153950/192847519-960d155a-ce99-4f04-9c13-db5ff670a36a.png">


## License

The [MIT](https://github.com/andylvua/QuestionsParser/blob/main/LICENSE) License (MIT)

Copyright © 2022, Andrew Yaroshevych