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.7.tar.gz (2.8 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.7-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swiftonpython-0.7.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

Hashes for swiftonpython-0.7.tar.gz
Algorithm Hash digest
SHA256 ce4035b18fae72cd332b22949e34da8b2f4ca8edcf78700ca49d6714c3369996
MD5 e59bc1c49af8fc0d3c4bdcadf0a7597a
BLAKE2b-256 046911076fc4d891bccf5e7e5c6237b12ff1f974191e8c4740a0618c39b7441c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swiftonpython-0.7-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

Hashes for swiftonpython-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f7f68d63ecee6de9c40d0b1a1c9d151c159040ea0b2fd341535b725fe835dfe9
MD5 e44ebe6291da7aa4f64eb4b37ea365ef
BLAKE2b-256 5178a37be5c74bbaa684f90dd647c6356cc0f84081f3c7dec873067e7fd1ce21

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