A Python binding to the Wandbox API.
Project description
Wandbox API for 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
- Bash
- C++
- C
- CPP
- C#
- D
- Elixir
- Go
- Haskell
- Java
- JavaScript
- Nim
- OpenSSL
- Perl
- PHP
- Python
- Ruby
- Swift
- TypeScript
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,compilers,versions,lang,option,permlink,run,template,run-template,help} ...
positional arguments:
{list,compilers,versions,lang,option,permlink,run,help}
list show list api response. see `list -h`
compilers show support compilers. see `compilers -h`
versions show support compilers. see `versions -h`
lang show support languages. see `lang -h`
option show compiler options. see `option -h`
version show compiler version from version-command. see `version -h`
permlink get permlink. see `permlink -h`
run build and run command. see `run +h`
template get wandbox template code. see `template -h`
run-template run wandbox template code. see `run-template +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
-V, --verbose verbose log
-s, --save generate permanent link.
--encoding ENCODING set encoding
--no-head ignore head compiler version (at auto setup)
--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
Bash
Source files required for runtime are automatically added to the file list.
- wandbox-bash
Bash Example
C++
Include files required for compilation are automatically added to the file list.
- wandbox-cxx
(wandbox -l C++) - wandbox-g++
(wandbox -l C++ -c gcc-*) - wandbox-clang++
(wandbox -l C++ -c clang-*)
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,compilers,versions,lang,option,permlink,run,template,run-template,help} ...
positional arguments:
{list,compilers,versions,lang,option,permlink,run,help}
list show list api response. see `list -h`
compilers show support compilers. see `compilers -h`
versions show support compilers. see `versions -h`
lang show support languages. see `lang -h`
option show compiler options. see `option -h`
version show compiler version from version-command. see `version -h`
permlink get permlink. see `permlink -h`
run build and run command. see `run +h`
template get wandbox template code. see `template -h`
run-template run wandbox template code. see `run-template +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
-V, --verbose verbose log
-s, --save generate permanent link.
--encoding ENCODING set encoding
--no-head ignore head compiler version (at auto setup)
--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
C
Include files required for compilation are automatically added to the file list.
- wandbox-cc
(wandbox -l C) - wandbox-gcc
(wandbox -l C -c gcc-*-c) - wandbox-clang
(wandbox -l C -c clang-*-c)
C Example
CPP
Include files required for compilation are automatically added to the file list.
- wandbox-CPP
(wandbox -l CPP) - wandbox-gcc-PP
(wandbox -l CPP -c gcc-*-pp) - wandbox-clang-PP
(wandbox -l CPP -c clang-*-pp)
CPP Example
CSharp
- wandbox-cs
(wandbox -l C#)
CSharp Example
D
- wandbox-dmd
(wandbox -l D -c dmd-*) - wandbox-gdmd
(wandbox -l D -c gdc-*) - wandbox-ldmd2
(wandbox -l D -c ldc-*) - wandbox-dub
D Example
Elixir
- wandbox-elixir
(wandbox -l Elixir) - wandbox-mix (Experimental)
Elixir Example
Go
- wandbox-go
(wandbox -l Go)
Go Example
Haskell
- wandbox-ghc
(wandbox -l Haskell) - wandbox-stack
Note: wandbox-ghc/wandbox-stack add -dynamic compiler option. (output file size workarround.)
Haskell Example
Java
- wandbox-java
(wandbox -l Java)
Java Example
JavaScript
Import files/modules required for runtime are automatically added to the file list.
- wandbox-js
(wandbox -l JavaScript) - wandbox-node
(wandbox -l JavaScript-c nodejs-*) - wandbox-spidermonkey
(wandbox -l JavaScript -c spidermonkey-*)
JavaScript Example
Nim
Import modules required for compilation are automatically added to the file list.
- wandbox-nim
(wandbox -l Nim)
Nim Example
OpenSSL
Even just having wandbox would be enough.
- wandbox-ssl
OpenSSL Example
wandbox-ssl genrsa -out test.key 2048
wandbox-ssl rsa -in test.key -pubout -out test.key.pub
Perl
Require files/modules required for runtime are automatically added to the file list.
- wandbox-perl
(wandbox -l Perl)
Perl Example
PHP
Require/Include files required for runtime are automatically added to the file list.
- wandbox-php
(wandbox -l PHP)
PHP Example
Python
Import files/modules required for runtime are automatically added to the file list.
- wandbox-python
(wandbox -l Python) - wandbox-python2
(wandbox -l Python -c cpython-2.7-*) - wandbox-python3
(wandbox -l Python -c cpython-*) - wandbox-pypy
(wandbox -l Python -c pypy-*)
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
Ruby
Require files required for runtime are automatically added to the file list.
- wandbox-ruby
(wandbox -l Ruby) - wandbox-mruby
(wandbox -l Ruby -c mruby-*)
Ruby Example
wandbox-ruby run sample.rb
Swift
- wandbox-swift
(wandbox -l Swift)
Swift Example
wandbox-swift run main.swift
TypeScript
Import files/modules required for compilation are automatically added to the file list.
- wandbox-tsc
(wandbox -l TypeScript)
TypeScript Example
CONTRIBUTING
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wandbox-api-0.9.22.tar.gz
.
File metadata
- Download URL: wandbox-api-0.9.22.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbcf5fb0bef45be539ad2c14a2a8af1c4bd51aed56672be6bcad434f5a478245 |
|
MD5 | 7b3d2f2d748eedbe5b6063f06d2c08e8 |
|
BLAKE2b-256 | 9f2024fc91bbf8712f7dc4b3f70843835ef13b2525354a26627f216b7ef85723 |
File details
Details for the file wandbox_api-0.9.22-py3-none-any.whl
.
File metadata
- Download URL: wandbox_api-0.9.22-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f7c65af6ddc555a9c7e7aae8d738ae6d0f0223f7002b607272660d999a7c78f |
|
MD5 | 896269a8e608f97ff896091eea58c5ff |
|
BLAKE2b-256 | 8297c5b452d573173055bb6b6478924f2d7e47b4befcdc57a824569b53e9ab98 |