grim/envconfig2

Update the docs for the change to url's

2017-08-30, Gary Kramlich
5ed88b4cd1bf
Parents 95018039c552
Children fc9667561a6c
Update the docs for the change to url's
  • +10 -0
    README.md
  • --- a/README.md Wed Aug 30 15:24:24 2017 -0500
    +++ b/README.md Wed Aug 30 15:28:09 2017 -0500
    @@ -51,10 +51,20 @@
    ### URL Example
    +By default envconfig2 will just verify that the given value can be parsed by urlparse.urlparse
    +
    >>> import os
    >>> os.environ['URL'] = 'https://example.com'
    >>> import envconfig2
    >>> envconfig2.url('URL')
    + 'https://example.com'
    +
    +If you would rather get a urlparse.Parse result you can tell envconfig2 to expand the url.
    +
    + >>> import os
    + >>> os.environ['URL'] = 'https://example.com'
    + >>> import envconfig2
    + >>> envconfig2.url('URL', expand=True)
    ParseResult(scheme='https', netloc='example.com', path='', params='', query='', fragment='')
    ### Required Example