GithubHelp home page GithubHelp logo

uricore's Introduction

urilib

Build Status

WARNING: Rough, raw, and fast changing code. Check back later. ;-)

--

Example of use:

>>> from httpcore.uri import URI
>>> from httpcore.iri import IRI
>>> iri = IRI(u'http://\N{SNOWMAN}/')
>>> iri
IRI(u'http://\u2603/')
>>> uri = URI(iri)
>>> uri
URI('http://xn--n3h/')
>>> iri.netloc
u'http://\u2603/'
>>> iri.hostname
'\u2603'
>>> iri.port is None
True
>>> iri.path
u'/'
>>> hasattr(iri, '__hash__')
True
>>> iri.replace(port=8000)
IRI(u'http://\u2603:8000/')
>>> iriq = iri.update_query({'foo': u'42'})
>>> iriq
IRI(u'http://\u2603/?foo=42')
>>> iriq.update_query(foo=None)
IRI(u'http://\u2603/')
>>> iriq.query
MultiDict([('foo', '42')])
>>> URI.from_template('http://{domain}/find{?year*}', domain="example.com",
... year=("1965", "2000", "2012"))
URI('http://example.com/find?year=1965&year=2000&year=2012')

uricore's People

Contributors

brainsik avatar glyphobet avatar kyleconroy avatar mwhooker avatar studer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.