Skip to main content

('Self-contained library to deal with metadata in Enthought-specific eggs',)

Project description

https://travis-ci.org/enthought/okonomiyaki.png?branch=master

Okonomiyaki is an experimental library aimed at consolidating a lot of our low-level code used for Enthought’s eggs.

The library contains code for the following:

  • producing EDM and enpkg-compatible egg from a tree + metadata

  • object models for eggs metadata, as well as versions and platform representations

It works on both python 2 and 3, and pypy. It is expected to work on pretty much any compliant python implementation.

Examples

Version parsing

To parse versions:

from okonomiyaki.versions import EnpkgVersion
# Every Version class has a from_string constructor
v1 = EnpkgVersion.from_string("1.3.3-1")
v2 = EnpkgVersion.from_string("1.3.2-3")

assert v1 > v2

Version instances are designed to be immutable, and to be used as keys in dictionaries.

Platform parsing

To parse epd platform strings (rh5-64, rh6_x86_64, etc.) consistently:

from okonomiyaki.platforms import EPDPlatform
# Internal representation is normalized.
rh5_new_name = EPDPlatform.from_string("rh5-x86_64")
rh5_old_name = EPDPlatform.from_string("rh5-64")

assert rh5_old_name == rh5_new_name

As for Version instances, EPDPlatform instances are designed to be immutable and to be used as keys in dictionaries.

Egg metadata

To parse Enthought eggs:

from okonomiyaki.file_formats import EggMetadata

# Only works for Enthought eggs
metadata = EggMetadata.from_egg("numpy-1.10.1-1.egg")
print(metadata.metadata_version)
print(metadata.name)
print(metadata.version)

This will take care of a lot of low-level, legacy details you don’t want to know about.

Project details


Download files

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

Source Distribution

okonomiyaki-1.1.1.tar.gz (441.4 kB view details)

Uploaded Source

Built Distribution

okonomiyaki-1.1.1-py2.py3-none-any.whl (521.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file okonomiyaki-1.1.1.tar.gz.

File metadata

  • Download URL: okonomiyaki-1.1.1.tar.gz
  • Upload date:
  • Size: 441.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.5 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/2.7.15

File hashes

Hashes for okonomiyaki-1.1.1.tar.gz
Algorithm Hash digest
SHA256 5b76d3823d6c128f9f088b619dee926ba1bead781b169606f2d6ddf72de5f2fb
MD5 0881a7eef2fbf8a126df6f451dc65c64
BLAKE2b-256 9c1fef76cabd69a4f1d11ba46592679162163be35480504cf2d012d3a931d9ad

See more details on using hashes here.

File details

Details for the file okonomiyaki-1.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: okonomiyaki-1.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 521.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.5 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/2.7.15

File hashes

Hashes for okonomiyaki-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2e34ce79dfa2d2c0e73c1a5e96d1d5fd68d53a0d5b5da9afbc6ceb70146c8807
MD5 99553b5a3ea1f3ad624b4e6eaf2b4092
BLAKE2b-256 143ab70137ae6ccda9be72f55e65dc69bd470e39d1f4275671dd422a5f314f2a

See more details on using hashes here.

Supported by

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