Skip to main content

Pasted client. Paste files or STDIN to a raw object.

Project description

Pipe STDIN or upload files to a raw paste. Get a URL back. Go be productive.

By default, pasted uses a hosted paste service, pasted.tech. You can also deploy your own instance of the service and use it instead.

Installation

https://img.shields.io/badge/pasted-stable-brightgreen.svg

From PyPi:

$ pip install pasted-client

Command line usage

Given a file:

$ cat somefile
Lorem ipsum.

Pipe the file to pasted and get back a URL to a raw paste of that file:

$ cat somefile | pasted
http://pasted.com/89001a7fbbe57e6921a91b2ba166fa98e1579cd2.raw

Do whatever you want with the URL. Curl it, email it, whatever:

$ curl http://pasted.tech/89001a7fbbe57e6921a91b2ba166fa98e1579cd2.raw
Lorem ipsum.

You can also paste multiple files without a pipe:

$ pasted /path/to/file1 /path/to/file2 /path/to/file3
https://pasted.tech/pastes/294b43b2cec9919063be1a3b49e8722648424779.raw
https://pasted.tech/pastes/3c56f1d7f112e09002627d24b82446431df5039a.raw
https://pasted.tech/pastes/f9372ce11a7370c54135f3c708131de123caf90f.raw

Python library usage

To use pasted.tech:

>>> c = pasted.Client()
>>> url = c.create_paste('Lorem ipsum.')
>>> print(url)
http://pasted.tech/89001a7fbbe57e6921a91b2ba166fa98e1579cd2.raw

Alternatively, if you’re using your own deployment of pasteraw, pass your own API endpoint to the client:

>>> c = pasteraw.Client('http://pasted.example.com/api/pastes')

Usage is otherwise identical to using pasted.tech.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pasted-client-0.0.5.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

pasted_client-0.0.5-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file pasted-client-0.0.5.tar.gz.

File metadata

  • Download URL: pasted-client-0.0.5.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for pasted-client-0.0.5.tar.gz
Algorithm Hash digest
SHA256 1986e32435cbedf2ab847fd20534c2b91974a48bf52cc2d9f625fea7d0cadaed
MD5 2a7ad9c3248a3b2ac78b604b6635ce67
BLAKE2b-256 aeb6e878a4a100f5482383a151ab588ca91e533639a27651e19398e01aced07b

See more details on using hashes here.

File details

Details for the file pasted_client-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pasted_client-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for pasted_client-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6403109506b24a42b87f8628536357c267031ebfa8c18e2838fa50ed2c5bac50
MD5 bc51e7b08f99485640f387cb17ff27ed
BLAKE2b-256 e157715afa6f98b3dd37107b26849bd81c6172a38fc69939d59d2007bf78ff00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page