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/bobbyshop-vui/swiftonpython

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: swiftonpython-0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 548009546c996f83abb4d0ae6421e36310a84be209989c0f4bc575b8a1d969f6
MD5 a3de7241b2ef149fb2abaeb04749ac54
BLAKE2b-256 bd20e60680168ea242d8c4506e230f2b6dfcd31cbd8f195cf731b637c042fd05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swiftonpython-0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5f26392e7e42a0b4ea164ed79beb685cd880423e2e6c01fb4414c4432a504175
MD5 5e1c0418f41e394424b974de84fa4758
BLAKE2b-256 499c74d67ba769d6f871691e0e09d5886015defdf79e1c3ade2ce3c02675d31e

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