Skip to main content

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

swiftonpython-0.4.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

swiftonpython-0.4-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file swiftonpython-0.4.tar.gz.

File metadata

  • Download URL: swiftonpython-0.4.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for swiftonpython-0.4.tar.gz
Algorithm Hash digest
SHA256 6683e57fa5abbcfd2770aaac35414623c6c3e2bb967d077964b30e12808811f5
MD5 feb65f6bb42dc8ee2c927fd1af4f5313
BLAKE2b-256 d94808674daa374b5d70032b0d342e8d2bdcf23da705954efc806a1d55f0ac8a

See more details on using hashes here.

File details

Details for the file swiftonpython-0.4-py3-none-any.whl.

File metadata

  • Download URL: swiftonpython-0.4-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for swiftonpython-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3f6ab8b68e943acf9aab085b53b022f100477b7204fb032795841f44deef1338
MD5 72c27e3b485f46081801b9d90182d160
BLAKE2b-256 08729a2e6c7a366958e3c1c04a26f188c13531a7d7528eff792669b0376a1804

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