Coder Social home page Coder Social logo

t184256 / hacks Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 0.0 39 KB

hacks, a python plugin library that doesn't play by the rules

License: MIT License

Python 100.00%
python python3 aspect-oriented aspects hacks preposition-based library plugin-system plugins

hacks's Issues

add setuptools integration

Using hacks as a plugin system with hacks.call(...) dispatcher just begs for setuptools-based plugins registration via entry_points.

Use case:

  • A class with several @hacks.into-decorated methods is ready to serve a good job as a plugin.
  • An opt-in form of with hacks.use(..., setuptools_autodiscovered=True) enables it.
  • CRASH/BURN!

Consider stripping stackframes

Possible ways:

  • flatten call tree within hacks (hurts readability)
  • use _call_with_frames_removed convention (is it applicable?)

Add initializers/deinitializers

Allow initializers/deinitializers for hacks.

It seems to be a standard and expected functionlaity for plugin systems.

Execute them in forward order in Registry's enter and in reverse order in exit.

Unclash __enter__ and __exit__

Should I rename enter and exit to hacks_enter and hacks_exit to make hack-grouping objects usable as standalone context managers?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.