Skip to main content

Rust library for generate Apple Wallet Passes for iOS, WatchOS, MacOS.

Project description

Passes

A Rust library for generating PassKit passes, featuring:

  • Read & parse .pkpass files
  • Build & make passes by using library API
  • Sign passes with certificate and compress to .pkpass
  • Change field values is pass by key name
  • Supported semantic tags for pass & fields
  • All features of Wallet Passes standard represented in library

Documentation:

Usage

Add this to your Cargo.toml:

[dependencies]
passes = "0.1.0"

Example

For building simple pass:

// Creating pass
let pass = PassBuilder::new(PassConfig {
    organization_name: "Test organization".into(),
    description: "Super gentlememe pass".into(),
    pass_type_identifier: "com.example.pass".into(),
    team_identifier: "AA00AA0A0A".into(),
    serial_number: "ABCDEFG1234567890".into(),
})
.grouping_identifier(String::from("com.example.pass.app"))
.logo_text("Test pass".into())
.build();

Creating package and generate .pkpass file:

let mut package = Package::new(pass);

// Save package as .pkpass
let path = Path::new("test_pass.pkpass");
let file = match File::create(&path) {
    Err(why) => panic!("couldn't create {}: {}", path.display(), why),
    Ok(file) => file,
};
package.write(file).unwrap();

For more examples, see examples directory.

License

Passes is distributed under the terms of the MIT license. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

passes_rs_py-2.0.0-cp313-cp313-manylinux_2_38_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.38+ x86-64

File details

Details for the file passes_rs_py-2.0.0-cp313-cp313-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for passes_rs_py-2.0.0-cp313-cp313-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 c482983e5082f829df2512794e0259c2b5bb7c457a347115497eddd82d1d9150
MD5 5b9a4484b8d31fc7201a9491b6748c8d
BLAKE2b-256 fb61140e53d1aa4d58161d70f6a54fe1175f494975a45955bdd7828891015537

See more details on using hashes here.

Provenance

The following attestation bundles were made for passes_rs_py-2.0.0-cp313-cp313-manylinux_2_38_x86_64.whl:

Publisher: release.yaml on jontyms/neo-passes-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page