| Crates.io | nautobot |
| lib.rs | nautobot |
| version | 0.2.0 |
| created_at | 2026-01-22 22:15:08.0677+00 |
| updated_at | 2026-01-25 10:09:16.789347+00 |
| description | ergonomic rust client for Nautobot REST API |
| homepage | https://github.com/cyberwitchery/nautobot.rs |
| repository | https://github.com/cyberwitchery/nautobot.rs |
| max_upload_size | |
| id | 2062769 |
| size | 263,562 |
ergonomic rust client for the nautobot rest api.
this crate provides a high-level, typed interface for interacting with nautobot, built on top of generated openapi bindings.
add this to your Cargo.toml:
[dependencies]
nautobot = "0.1.1"
tokio = { version = "1.0", features = ["full"] }
use nautobot::{Client, ClientConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// initialize the client
let config = ClientConfig::new("https://nautobot.example.com", "your-api-token");
let client = Client::new(config)?;
// list devices from dcim
let devices = client.dcim().devices().list(None).await?;
println!("found {} devices", devices.count);
// iterate through results
for device in devices.results {
println!("device: {}", device.name.unwrap_or_default());
}
Ok(())
}
the client includes helper methods for common operations that go beyond basic crud:
// ipam: find available ips in a prefix
let available_ips = client.ipam().prefix_available_ips("prefix-uuid", None).await?;
// dcim: trace a cable path from an interface
let trace = client.dcim().interface_trace("interface-uuid").await?;
// extras: run a job
use nautobot::extras::JobInputRequest;
let response = client.extras().job_run("job-uuid", &JobInputRequest::new()).await?;
tokio and reqwest for non-blocking i/o.nautobot-openapi for comprehensive schema coverage.