Pythonic.swift alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view Pythonic.swift alternatives based on common mentions on social networks and blogs.
-
SwifterSwift
:A handy collection of more than 360 native Swift 3 extensions to boost your productivity. -
SwiftGen
A collection of Swift tools to generate Swift code (enums for your assets, storyboards, Localizable.strings, …) -
SwiftGen-Storyboard
A tool to auto-generate Swift enums for all your Storyboards, Scenes and Segues constants + appropriate convenience accessors. -
LifetimeTracker
LifetimeTracker can surface retain cycle / memory issues right as you develop your application, and it will surface them to you immediately, so you can find them with more ease. -
SwiftLinkPreview
It makes a preview from an url, grabbing all information such as title, relevant texts and images. -
PinpointKit
An open-source iOS library in Swift that lets your testers and users send feedback with annotated screenshots and logs using a simple gesture. -
Highlighter
Highlight whatever you want! Highlighter will magically find UI objects such as UILabel, UITextView, UITexTfield, UIButton in your UITableViewCell or other Class. -
Butterfly
A lightweight library for integrating bug-report and feedback features with shake-motion event.
Scout APM: A developer's best friend. Try free for 14-days
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Pythonic.swift or a related project?
README
Pythonic.swift
Pythonic.swift is a Swift library implementing selected parts of Python 2.7's standard library and making them available to your Swift code.
import Pythonic
allows you to write Python flavored code such as:
#!/usr/bin/env swift -I .
import Pythonic
if re.search("^foo", "foobar") {
print("ok!")
}
if any(["foo", "bar", "zonk"]) {
print(chr(ord("a"))) // a
}
var strings = ["foo", "bar"]
print(":".join(strings)) // foo:bar
if strings {
print(strings[0]) // foo
}
if len(strings) == 2 {
print(strings[1].upper()) // BAR
print(strings[1].split("a")) // ["b", "r"]
}
var greeting = " hello pythonista "
if greeting.strip().startswith("hello") {
print(greeting.strip().title()) // Hello Pythonista
}
var numbers = [1, 2, 3, 4, 5]
print(sum(numbers)) // 15
print(max(numbers)) // 5
See the test suite Pythonic-test.swift and the Swift syntax checker for more examples. Questions? Get in touch on Twitter @practicalswift.
Getting started
git clone https://github.com/practicalswift/Pythonic.swift.git
cd Pythonic.swift/src/
make
make test
mkdir my-pythonic-app/
cd my-pythonic-app/
cp ../Pythonic.swiftdoc ../Pythonic.swiftmodule ../libPythonic.dylib .
cat << EOF > my_pythonic_app.swift
#!/usr/bin/env swift -I .
import Pythonic
assert(" hello ".strip() == "hello")
println("This feels really.. Pythonic!")
EOF
chmod +x my_pythonic_app.swift
./my_pythonic_app.swift
Contributing
Code contributions are more than welcome! This is the quick guide to contributing:
- Fork the project
- Implement function
foo
from the Python standard library - Add a test case for
foo
inPythonic-test.swift
- Make sure the test case passes in both Python and Swift by running
make test
- Submit a pull request
- Repeat until we're done :-)