A Python library to run Swift code
Project description
swiftonpython là một thư viện Python giúp thực thi mã Swift từ Python, tích hợp linh hoạt để bạn có thể chạy mã Swift mà không cần biên dịch .so riêng biệt. Chỉ cần cài đặt và sử dụng ngay trong dự án Python.
Cài Đặt: Đảm bảo rằng bạn đã cài đặt Swift và có thể truy cập từ dòng lệnh.
Cài đặt thư viện từ PyPI:
Link github: https://github.com/hqmdokkai/swiftonpython.git
pip install swiftonpython
Sử Dụng: Sau khi cài đặt, bạn chỉ cần import thư viện và thực thi mã Swift trực tiếp từ Python.
Ví dụ sử dụng:
import swiftonpython
# Mã Swift bạn muốn chạy
swift_code = """
print("Hello from Swift!")
"""
# Gọi hàm để thực thi mã Swift
swiftonpython.swiftonpython(swift_code)
Vậy là xong! Mã Swift sẽ được thực thi trực tiếp trong môi trường Python mà không cần phải cấu hình phức tạp.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swiftonpython-0.6.tar.gz.
File metadata
- Download URL: swiftonpython-0.6.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0d570ae06c684a0a43004cb6b0aeaf4aa405eb4faea0b81464c1a8b4e9acc0b
|
|
| MD5 |
b22483ec10f53632273ead66f2df9068
|
|
| BLAKE2b-256 |
a5f9aa6ea9b4d8ae699f2125947264ff0ed9a4652872e401495cd348ca688050
|
File details
Details for the file swiftonpython-0.6-py3-none-any.whl.
File metadata
- Download URL: swiftonpython-0.6-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
642ff0132affd3966422281f0a53853b34501295853fadf35fad3530051516b3
|
|
| MD5 |
ab6dc763b55ab9ad760ff6c69b420b3e
|
|
| BLAKE2b-256 |
2f28f7380af810aebb34cdcabfe113a28e5bd5b897815709ec89a063683bfa7d
|