Skip to content

Commit f25229e

Browse files
committed
Add an example to README.md
1 parent 60f05f1 commit f25229e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ python-pkginfo = "0.1"
1717

1818
then you are good to go. If you are using Rust 2015 you have to add ``extern crate python_pkginfo`` to your crate root as well.
1919

20+
## Example
21+
22+
```rust
23+
use python_pkginfo::Distribution;
24+
25+
fn main() {
26+
let dist = Distribution::new("path/to/package.whl").unwrap();
27+
println!("{:#?}", dist.metadata());
28+
}
29+
```
30+
2031
## License
2132

2233
This work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file.

0 commit comments

Comments
 (0)