go-paperspace is a Go client library for accessing the Paperspace API.
import "github.com/timdurward/go-paperspace"
Construct a new Paperspace client, then use the various services on the client to access different parts of the Paperspace API. For example:
config := &paperspace.Config{
APIKey: "<API KEY>",
}
// Default http.Client
client, _ := paperspace.NewClient(config, nil)
// Create Machine
// https://paperspace.github.io/paperspace-node/machines.html#.create
m := &paperspace.MachinesRequest{
Region: "West Coast (CA1)",
MachineType: "Air",
Size: 50,
BillingType: "monthly",
MachineName: "Provisioned using Go API client.",
TemplateID: "<template_id>",
}
machine, _, err := client.Machines.Create(m)
- Base Paperspace Client
- Machines Service
- Networks Service
- Scripts Service
- Templates Service
- Jobs Service
- Tests
- Versioning
If you submit a pull request, please keep the following guidelines in mind:
- Code should be
go fmt
compliant. - Types, structs and funcs should be documented.
Assuming your $GOPATH
is set up according to your desires, run:
go get github.com/timdurward/go-paperspace