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]
neopasses = "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.0a1-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.0a1-cp313-cp313-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for passes_rs_py-2.0.0a1-cp313-cp313-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 b40c4fd041d6438122b6aa11dab5fae3c35a388b10cb05a87c8d2d90bbac831f
MD5 993b7a8a0d63d25c883577e34c7559d4
BLAKE2b-256 b6ef3ddca48397a477b0992b4dd52d4f8d75e421c48b4c860b6fd128752de7c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for passes_rs_py-2.0.0a1-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