Skip to content
Paste service that uses Pygments
CSS Python Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


paste-py is a dead simple paste service written in Python. An instance is running at

Using it


The most useful utility is the script: save it somewhere in your path and use it as follows:

  • foo will paste the content of the file foo and return the URL of the paste
  • - will paste what it reads from stdin and the URL of the paste

You can also put the language to highlight with and the user as second and third argument (though the language will be detected from the extension).

You can look at the parameters at the beginning of the script to set a default user or automatically copy the paste URL.


With paste-py, everything happens in the arguments you give in the URL. Every argument is prepended by a &. The following arguments can be used:

  • ln: add line numbers to the paste
  • hl=foo: syntax highlight the paste as language foo
  • raw: raw paste, to download it; you can also use the prefix /raw/ to have a shell-friendly URL (eg.
  • script: used to paste from a script (will only return the URL, no html)


Users are also supported: enter a username (eg. foobar) when pasting something, and you can access all your pastes by browsing Note that you cannot delete your pastes, so think twice before pasting something sensitive. In case you really need to delete a paste, contact me.


The only dependencies are Tornado and Pygments. If you want to use the script to launch paste-py as a daemon, grizzled is also needed.

$ pip install tornado pygments grizzled


You can either launch it as a daemon or not: launch or Look at the help (--help) if you want to change the listening address. For example:

$ LANG=en_US.UTF-8 python --addr= --port=8080


The design is pretty basic, but some people made improvements to it. If you want a better design, look at


WTFPL, ie. do what the fuck you want with it.

You can’t perform that action at this time.