https://github.com/apache/airflow-client-go
Apache Airflow - OpenApi Client for Go
https://github.com/apache/airflow-client-go
airflow apache apache-airflow apache-airflow-client go
Last synced: about 1 year ago
JSON representation
Apache Airflow - OpenApi Client for Go
- Host: GitHub
- URL: https://github.com/apache/airflow-client-go
- Owner: apache
- License: apache-2.0
- Created: 2020-06-28T11:19:52.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-10-06T14:51:14.000Z (over 2 years ago)
- Last Synced: 2025-03-30T03:21:49.969Z (about 1 year ago)
- Topics: airflow, apache, apache-airflow, apache-airflow-client, go
- Language: Go
- Homepage: https://airflow.apache.org/
- Size: 537 KB
- Stars: 192
- Watchers: 23
- Forks: 23
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Airflow Go client
=================
Go Airflow OpenAPI client generated from [openapi
spec](https://github.com/apache/airflow/blob/master/clients/gen/go.sh).
Install
-------
```
go get github.com/apache/airflow-client-go/airflow@latest
```
Usage
-----
```go
package main
import (
"context"
"fmt"
"github.com/apache/airflow-client-go/airflow"
)
func main() {
conf := airflow.NewConfiguration()
conf.Host = "localhost:8080"
conf.Scheme = "http"
cli := airflow.NewAPIClient(conf)
cred := airflow.BasicAuth{
UserName: "username",
Password: "password",
}
ctx := context.WithValue(context.Background(), airflow.ContextBasicAuth, cred)
variable, _, err := cli.VariableApi.GetVariable(ctx, "foo").Execute()
if err != nil {
fmt.Println(err)
} else {
fmt.Println(variable)
}
}
```
See [README](./airflow/README.md#documentation-for-api-endpoints) for full client API documentation.