GithubHelp home page GithubHelp logo

manic's Introduction

Manic

Crates.io Crates.io Tests

Crates.io dependency status

Fast and simple multithread downloads

Provides easy to use functions to download a file using multiple async or threaded connections while taking care to preserve integrity of the file and check it against a checksum.

Feature flags

  • progress: Enables progress reporting using indicatif [enabled by default]
  • json: Enables use of JSON features on the reqwest Client [enabled by default]
  • rustls: Use Rustls for HTTPS [enabled by default]
  • openssl: Use OpenSSL for HTTPS
  • threaded: Enable multithreaded client
  • async: Enable async client [enabled by default]

Crate usage

Examples

Async example

use manic::Downloader;

#[tokio::main]
async fn main() -> Result<(), manic::ManicError> {
	let workers: u8 = 5;
	let client = Downloader::new("https://crates.io", workers).await?;
	let _ = client.download().await?;
	Ok(())
}

Multithread example

use manic::threaded::Downloader;

fn main() -> Result<(), manic::ManicError> {
    let workers: u8 = 5;
    let client = Downloader::new("https://crates.io", workers)?;
    let _ = client.download()?;
    Ok(())
}

License: MIT OR Apache-2.0

manic's People

Contributors

renovate[bot] avatar x0f5c3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

manic's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • url 2.2.2
  • sha2 0.10.6
  • indicatif 0.17.2
  • tracing 0.1.28
  • futures 0.3.17
  • rayon 1.5.1
  • derive_builder 0.12.0
  • bytes 1.1.0
  • thiserror 1.0.30
  • md-5 0.10.5
  • futures-channel 0.3.18
  • rusty_pool 0.7.0
  • derive_more 0.99.16
  • tokio 1.14.0
  • reqwest 0.11.6
  • pretty_env_logger 0.4.0
  • log 0.4.14
  • criterion 0.4.0
  • reqwest 0.11.6
  • tempfile 3.2.0
  • warp 0.3.1
  • tokio 1.12.0
github-actions
.github/workflows/fmt_and_clippy.yml
  • actions/checkout v2

  • Check this box to trigger a request for Renovate to run again on this repository

How does `bar_style` work?

let workers: u8 = 8;
let client = Downloader::new("", workers).await;
let mut test1= client.unwrap();
test1.bar_style(ProgressStyle::default_bar().template("{spinner:.green}"));
let test2=test1.progress_bar().download().await;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.