![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Python bindings for piston_rs
.
piston_rspy provides Python users the ability to interact with the Piston code execution engine, but behind the scenes it is powered by piston_rs, a Rust library designed for the same purpose.
piston_rspy officially supports Python versions 3.8, 3.9, 3.10, 3.11, and 3.12.
For an in depth look at the API, check out the documentation!
pip install piston_rspy
Fetching the available runtimes from Piston.
import asyncio
import piston_rspy
async def main() -> None:
client = piston_rspy.Client()
runtimes = await client.fetch_runtimes()
print(runtimes)
if __name__ == "__main__":
asyncio.run(main())
Executing python code via Piston.
import asyncio
import piston_rspy
async def main() -> None:
file = piston_rspy.File(
name="main.py",
content="for i in range(10): print(i)",
)
executor = piston_rspy.Executor(
language="python",
version="3.10",
files=[file],
)
client = piston_rspy.Client()
response = await client.execute(executor)
print(f"Language: {response.language} v{response.version}")
if response.compile:
print(f"Compilation:\n{response.compile.output}")
print(f"Output:\n{response.run.output}")
if __name__ == "__main__":
asyncio.run(main())
The builder flow that is used in piston_rs
is available in
piston_rspy
as well.
import asyncio
import piston_rspy
async def main() -> None:
client = piston_rspy.Client()
response = await client.execute(
piston_rspy.Executor()
.set_language("python")
.set_version("3.10")
.add_file(
piston_rspy.File(
name="main.py",
content="for i in range(10): print(i)",
)
)
)
print(f"Language: {response.language} v{response.version}")
if response.compile:
print(f"Compilation:\n{response.compile.output}")
print(f"Output:\n{response.run.output}")
if __name__ == "__main__":
asyncio.run(main())
piston_rspy is licensed under the MIT License.
FAQs
Python bindings for piston_rs.
We found that piston-rspy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.