Skip to main content

A Python binding to the Wandbox API.

Project description

Wandbox API for Python

PyPI version Python Versions Codacy Badge Language grade: Python

Wandbox is a social compilation service.
This project is a Pythonic binding to the Wandbox API, and CLI command.

Installation

pip install wandbox-api

CLI

wandbox

usage: wandbox [-h] [-v] [-l LANGUAGE] [-c COMPILER] [-x OPTIONS] [-r RUNTIME_OPTIONS] [-n] [-s] [--encoding ENCODING]
               [--no-default] [--stdin STDIN] [--retry-wait SECONDS] [--retry COUNT]
               {list,compiler,versions,lang,option,permlink,run,help} ...

positional arguments:
  {list,compiler,versions,lang,option,permlink,run,help}
    list                show list api response. see `list -h`
    compiler            show support compilers. see `compiler -h`
    versions            show support compilers. see `versions -h`
    lang                show support languages. see `lang -h`
    option              show compiler options. see `option -h`
    permlink            get permlink. see `permlink -h`
    run                 build and run command. see `run +h`
    help                show subcommand help. see `help -h`

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -l LANGUAGE, --language LANGUAGE
                        specify language
  -c COMPILER, --compiler COMPILER
                        specify compiler
  -x OPTIONS, --options OPTIONS
                        used options for a compiler
  -r RUNTIME_OPTIONS, --runtime-options RUNTIME_OPTIONS
                        runtime options
  -n, --dryrun          dryrun
  -s, --save            generate permanent link.
  --encoding ENCODING   set encoding
  --no-default          no set default options
  --stdin STDIN         set stdin
  --retry-wait SECONDS  wait time for retry when HTTPError occurs
  --retry COUNT         number of retries when HTTPError occurs

C++

  • wandbox-cxx
  • wandbox-g++
    (wandbox-cxx -c gcc-head)
  • wandbox-clang++
    (wandbox-cxx -c clang-head)
usage: wandbox-cxx [-h] [-v] [-c COMPILER] [-x OPTIONS] [-r RUNTIME_OPTIONS] [-n] [-s] [--encoding ENCODING]
                   [--no-default] [--stdin STDIN] [--retry-wait SECONDS] [--retry COUNT] [--std VERSION]
                   [--boost VERSION] [--no-warning] [--optimize] [--cpp-pedantic PEDANTIC] [--cpp-verbose] [--sprout] [--msgpack]
                   {list,compiler,versions,lang,option,permlink,run,help} ...

positional arguments:
  {list,compiler,versions,lang,option,permlink,run,help}
    list                show list api response. see `list -h`
    compiler            show support compilers. see `compiler -h`
    versions            show support compilers. see `versions -h`
    lang                show support languages. see `lang -h`
    option              show compiler options. see `option -h`
    permlink            get permlink. see `permlink -h`
    run                 build and run command. see `run +h`
    help                show subcommand help. see `help -h`

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -c COMPILER, --compiler COMPILER
                        specify compiler
  -x OPTIONS, --options OPTIONS
                        used options for a compiler
  -r RUNTIME_OPTIONS, --runtime-options RUNTIME_OPTIONS
                        runtime options
  -n, --dryrun          dryrun
  -s, --save            generate permanent link.
  --encoding ENCODING   set encoding
  --no-default          no set default options
  --stdin STDIN         set stdin
  --retry-wait SECONDS  wait time for retry when HTTPError occurs
  --retry COUNT         number of retries when HTTPError occurs
  --std VERSION         set --std options
  --boost VERSION       set boost options version X.XX or nothing
  --no-warning          disable warning option
  --optimize            use optimization
  --cpp-pedantic PEDANTIC
                        use cpp-pedantic
  --cpp-verbose         use cpp-verbose
  --sprout              use sprout
  --msgpack             use msgpack

C++ Example

wandbox-cxx -c gcc-head run main.cpp -DWANDBOX

CXX="wandbox-gcc run" make

CPP (C PreProcessor)

  • wandbox-CPP
  • wandbox-gcc-PP
    (wandbox-CPP -c gcc-head-pp)
  • wandbox-clang-PP (wandbox-CPP -c clang-head-pp)

Python

  • wandbox-python
  • wandbox-python2
    (wandbox-cxx -c cpython-2.7-head)
  • wandbox-python3
    (wandbox-cxx -c cpython-head)
  • wandbox-pypy (wandbox-cxx -c pypy-head)

Python Example

wandbox-python3 run sample.py

wandbox-python supports setup.py

wandbox-python -c cpython-head -r test run setup.py

If you open a file, add the file

wandbox-python -c cpython-head -r test run setup.py README.md

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

wandbox-api-0.9.8.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wandbox_api-0.9.8-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file wandbox-api-0.9.8.tar.gz.

File metadata

  • Download URL: wandbox-api-0.9.8.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

File hashes

Hashes for wandbox-api-0.9.8.tar.gz
Algorithm Hash digest
SHA256 b6c000f6a30c78fd6ce528f5f6a7021fb1ab691ffb5dbd99482b010860c0cfb9
MD5 f833949c7efd6f69844e1205f551a636
BLAKE2b-256 8934a9f04ab12ff92a11cdf2f419be26b46936933f88b6edaf7763406055fa45

See more details on using hashes here.

File details

Details for the file wandbox_api-0.9.8-py3-none-any.whl.

File metadata

  • Download URL: wandbox_api-0.9.8-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8

File hashes

Hashes for wandbox_api-0.9.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0ff33093a5d4f3ef4a499dfc1662970aabb644458d98385bc7f1f5483a1c3662
MD5 b32db9c6a0884df1d3d6f5fae3244358
BLAKE2b-256 1fcc1b030da689db4bb6f65f0d338b581a6aacb519a8945887e1bb8e50b32f31

See more details on using hashes here.

Supported by

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