Skip to content

kkrbalam/flink-cookiecutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using the Flink Cookiecutter Template for PyFlink Jobs

This template is designed to help you quickly scaffold a PyFlink project, ensuring you have all the necessary files and structure to get started with your Flink jobs. Below are the steps to use this cookiecutter template:

Prerequisites

  • Python 3.8 or higher

  • Cookiecutter Python package installed. If you do not have cookiecutter installed, you can install it using pip:

    pip install cookiecutter
    

Generating Your PyFlink Project

  1. Generate the Project: Run the following command in your terminal, replacing <your-project-name> with the desired name of your project:

    cookiecutter gh:yourgithubusername/flink-cookiecutter-template --output-dir <your-project-name>
    

    This command will prompt you for various configurations like project name, author name, Flink version, etc. Fill these out according to your project's needs.

  2. Navigate to Your Project Directory: Once the project is generated, move into your project directory:

    cd <your-project-name>
    
  3. Install Dependencies: The template uses Poetry for dependency management. Install the project dependencies by running:

    poetry install
    
  4. Explore Your Project: Your new PyFlink project will include a basic project structure, including a src directory for your Flink jobs, a tests directory for unit tests, and configuration files for project dependencies and settings.

  5. Running Your Flink Job: With your environment set up, you can start developing your Flink jobs. Place your job scripts in the src directory. You can run your Flink jobs locally or deploy them to a Flink cluster depending on your setup.

Next Steps

  • Customize the pyproject.toml file as needed for your project dependencies.
  • Develop your Flink jobs within the src directory.
  • Add unit tests in the tests directory to ensure your jobs run as expected.

By following these steps, you can quickly set up and start developing your PyFlink projects using this cookiecutter template.

About

Python cookiecutter package for pyflink

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published