Git Product home page Git Product logo

buildurl's Issues

Option for keeping trailing slash in path

Hello, http://www.example.com/path can be different from http://www.example.com/path/ or even might not exists at all. So it would be good to have an option to keep trailing slash.

[FEAT] Fluent interfaces

It would be nice if methods add_path() and add_query() return self so one can easily chain calls like u.add_path('foo').add_path('bar')

Also fluent setter for trailing_slash would be helpful. E.g.:

def set_trailing_slash(self, enabled = True):
  self.trailing_slash = bool(enabled)
  return self

[FEAT/BUG] Automatically convert arguments of path/query to string

  • Bug part: I was trying to do something like .add_path(['user', 123]) and it didn't raise an exception during the execution of the method but only when i called .get, which is imho late.

  • Feature request: Everything should be converted to str automatically (not raising error) or at least usual types like int, float. I think it should be user's responsibility to provide desired str output and everyone knows that resulting url is always str.

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.