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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for IPMap type #169

Open
joshgodsiff opened this issue Feb 26, 2018 · 0 comments
Open

Add support for IPMap type #169

joshgodsiff opened this issue Feb 26, 2018 · 0 comments

Comments

@joshgodsiff
Copy link

joshgodsiff commented Feb 26, 2018

Hey, cool library 馃槃

I have a use case that's fairly similar to the IPSet type, except I need to map IPNetworks to particular values, while merging CIDRs together if the values are the same. As far as I can tell, this isn't currently possible in the library, but it seems like something that would be broadly useful, and not too difficult to implement.

As an example, I'd like something that worked like:

>>> IPMap({'192.0.2.0': 'foo'}) | IPMap({'192.0.2.1': 'foo'})
IPMap({'192.0.2.0/31': 'foo'})

>>> IPSet({'192.0.2.0': 'foo'}) | IPSet({'192.0.2.1': 'bar'})
IPMap({'192.0.2.0': 'foo', '192.0.2.1': 'bar'})
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

1 participant