Skip to main content

No project description provided

Project description

SQLetic

SQLetic is an SQL database engine in pure python iterating over list acting as table indexed by there name in a dictionary.

    statement = """
select concat('In ', cities.name, ' city, the spoken language is ', corresponding_countries.language, ' where ', citizens.name, ' live.')
from cities
     inner join countries as corresponding_countries
           on (cities.country=corresponding_countries.name)
     inner join citizens
           on (cities.name=citizens.city)
    """

    database = {"cities":({"name": "Prague", "country": "Czechia"},
                          {"name": "Cesky Krumlov", "country": "Czechia"},
                          {"name":"Paris", "country": "France"}),
                "countries":({"name": "Czechia", "language": "Czech"},
                             {"name": "France", "language": "French"}),
                "citizens":({"name": "Pablo Picasso", "city": "Paris"},
                            {"name": "Alfons Mucha", "city": "Prague"},
                            {"name": "Egon Schiele", "city": "Cesky Krumlov"})}
    engine = Engine(database)
    engine.execute(statement)
    
    for entry in engine:
        print(entry)

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

sqletic-0.1.1.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

sqletic-0.1.1-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page