Skip to main content

This allows you to load modules in an elegant way.

Project description


☁️ ORLY ☁️


Yes, if you are looking for an open-source module to automatically import your dependencies and handle installation errors with ease, you are in the right place!



✔ Basic Example ✔

import orly
orly.set([
    'requests',
    'os'
])

print(requests.get('https://nohello.net').status_code)

⚙️ Features ⚙️

  • ✅ Auto-installs missing modules using pip
  • ✅ Supports aliasing (module~~alias)
  • ✅ Handles modules with different pip names (py_mod==pip_package)
  • ✅ Silent mode to suppress internal logs/prints (*)
  • ✅ Compatible with Linux systems requiring --break-system-packages
  • ✅ Clean console output (auto clear after each import)

🧠 Advanced Usage 🧠

import orly
orly.set([
    'requests~~req',            # 'requests' accessible as 'req'
    'bs4==beautifulsoup4',      # 'bs4' is imported; pip package name is "beautifulsoup4"
    'discord',                  # Normal import
    'discord.ext.commands*'     # Silent import of submodule
])

🛑 Appending * to the module string makes it silent:
‣ Disables print() from the module (if possible)
‣ Disables logging propagation

You can also globally silence everything:

orly.set(['requests', 'pandas', 'numpy'], silent=True)

💖 Auto-Setup 💖

try: 
    import orly
except ImportError:
    try:
        __import__('subprocess').check_call([__import__('sys').executable, "-m", "pip", "install", "orly"])
    except:
        __import__('subprocess').check_call([__import__('sys').executable, "-m", "pip", "install", "orly", "--break-system-packages"])
    finally: 
        import orly

📌 Disclaimer 📌


- This project is for educational purposes only. - Do not use this in any harmful, malicious or unethical way. - I decline any responsibility for misuse.

by Zarby

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

orly-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

orly-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file orly-0.1.0.tar.gz.

File metadata

  • Download URL: orly-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for orly-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a01402c3175c5185afb33b33a3a7b5fbbacc615099c2d58689ef8221bbea5c3c
MD5 6612e3e6efbb03be51d9e26aa20474e8
BLAKE2b-256 26d5e2c69b5bec192a6ebf5e9dec8a008678c8a9eabf548e3574c79e9170961b

See more details on using hashes here.

File details

Details for the file orly-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: orly-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for orly-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1c74c96345964dc781f0006b89df5ec7ceef8043af9032fa54aa2ea2601d45d
MD5 c6b12e2d4fdd93686542eceae11e4694
BLAKE2b-256 7cd42757bf5fdaed2dff284cde8487e4f0759fff42e2d163562433e0723c4a47

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