Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide method for getting namespace from any ID #190

Open
bworrell opened this issue Aug 19, 2014 · 0 comments
Open

Provide method for getting namespace from any ID #190

bworrell opened this issue Aug 19, 2014 · 0 comments
Assignees

Comments

@bworrell
Copy link
Contributor

IDs are QNames, which contain namespaces as part of their form. We should provide either a utility method or a new class for IDs that has a method for returning the namespace along with the ID itself.

Something like...

observable.id_.get_namespace() # returns {'namespace': 'http://example.com', 'alias': 'example'}

# OR

cybox.utils.get_id_namespace(observable.id_)  # returns {'namespace': 'http://example.com', 'alias': 'example'}

Related to STIXProject/python-stix#176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants