#package-manager #quickly #built #response #client #fetch #create

quickfetch

A library built to create package managers quickly!

3 unstable releases

new 0.2.0 Jun 15, 2024
0.1.1 Jun 12, 2024
0.1.0 Jun 11, 2024

#198 in Operating systems

Download history 17/week @ 2024-06-05 435/week @ 2024-06-12

452 downloads per month

MIT license

80KB
530 lines

QuickFetch logo

A Library to Fetch well Quickly...

⚠️ WORK IN PROGRESS AND NOT READY TO BE USED FOR PRODUCTION YET

This library is built to handle multiple requests within a Client (reqwest client which will handle it all under a Client Pool) , cache the response results, and handle these in parallel and asynchronously.

The goal is to be a one-stop shop for handling local package manager development to handle multiple packages with a local cache to easily update, get and remove the different responses.

Usage

use std::path::PathBuf;

use quickfetch::package::{Config, Package};
use quickfetch::pretty_env_logger;
use quickfetch::Fetcher;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    pretty_env_logger::init();
    let config: Config<Package> = Config::from_toml_file("examples/pkgs.toml").await?;

    let mut fetcher: Fetcher<Package> = Fetcher::new(config.packages(), "mufiz")?;
    fetcher.fetch(Default::default()).await?;
    fetcher.write_all(PathBuf::from("pkgs")).await?;
    Ok(())
}

Dependencies

~12–26MB
~415K SLoC