Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    BJ Dierkes
    @derks
    @zero-signal good to hear. Please let me know if you run in to any other issues
    sud117
    @sud117
    hi I am using cement framework for our data processing module.But when we want to distibute our CLI app we don't wan to share our code.IS it possible at Cement framework level
    @derks can you please help me how to create app which we can share to clients without giving source code
    BJ Dierkes
    @derks
    @sud117 that is more of a Python specific question, and not framework
    you can destribute just Python bytecode (.pyc, and .pyo) but that is easily reverse-engineerable and or doesn’t completely hide your code if I recall correctly
    No connection between “concrete” and “cement” mind you. ;)
    though: pyconcrete is an experimental project, there is always a way to decrypt .pye files, but pyconcrete just make it harder.
    sud117
    @sud117

    Thank you so much.I would like to know what would be the execution time.Will it take more comparatively with .pyc

    @derks

    BJ Dierkes
    @derks
    @sud117 I unfortunately don’t have any experience trying to encrypt or hide code from end-users, and everyhting I’ve built on Cement is either in-house or Open Source
    One question… are you trying to hide specific code that isn’t necessarily required by the “public” user… like an admin/internal code? If so, I’d suggest putting everything you don’t want to share in a plugin… and just don’t destribute the plugin. That way, the end-user can use the public bits freely, and the internal/admin code is will work just the same after installing/enabling the plugin
    Sam Likins
    @samlikins
    In the BOSS based project templates there is a "projectName/config/projectname.conf" and "projectName/config/plugins.d/example.conf" file. i've attempted reading settings from both of these files, but they don't seem to be loaded. Aren these files
    Aren't these files supposed to be default values for the project and project plugins respectively?
    BJ Dierkes
    @derks
    @samlikins Yes, they are intended to be the defaults … however, ./config is not in the config_files search path (by default)
    so you’d need to copy it to ~/.yourapp.conf or /etc/yourapp/yourapp.conf, etc… then modifying the config should take affect
    Sam Likins
    @samlikins
    @derks: I just added app.config.parse_file('%s/config/facetracker.conf' % os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))) before app.run() and it worked... I'd like default values in the project that can be superseded by the values in system and user configurations.
    do you think this is this an elegant solution?
    BJ Dierkes
    @derks
    that works fine… better would be to redefine CementApp.Meta.config_files to include it
    Sam Likins
    @samlikins
    @derks: is there already a mechanism for deriving the path to the project directory? I have one, but I don't want to re-implement it if one exists in the code-base already.
    Sam Likins
    @samlikins
    @derks when I was testing the example in Extending CementApp I noticed that if I attempted to access the "api" configurations in the "load" function they weren't there yet, but they were their at "pre_run". This was confusing to me, as the config must have been read to run the "load" function (as that is contingent on "enable_plugin" being true) at that time. Is this an intentional state? please explain.
    BJ Dierkes
    @derks
    @samlikins no, there isn’t anything official yet… If you make a Github feature request I’ll work on it, as it would be useful to have.
    The load() function is called durint app.setup() … so, you shouldn’t expect things to be ready to use in load()
    Some will work, some won’t… because it depends on the load order
    You want to do a post_setup or pre_run hook
    Sam Likins
    @samlikins
    @derks Thanks, I created datafolklabs/cement#485.
    BJ Dierkes
    @derks
    very good
    Sam Likins
    @samlikins
    @derks Without looking too hard I wanted to ask you if you've already implemented somewhere (or plan to do so in the future) an dependency injector service for cement. I've located dependency_injector on pypi and it looks like a somewhat reasonable package at first glance, just didn't want to blaze down old roads. Thanks.
    BJ Dierkes
    @derks
    @samlikins to be honest, dependency injection is new to me… and is not something I’ve looked at for Cement
    Sam Likins
    @samlikins
    @derks Okay, well I'm doing the footwork to see how best to implement it into a framework extension...
    BJ Dierkes
    @derks
    \
    BJ Dierkes
    @derks
    @all just a note to let everyone know that I will be retiring this Gitter channel in the near future and will be using Slack instead. Everything I do elsewhere including work, etc is all in Slack and so it really makes sense for me to have everything in one place (and easier to keep up with responses when necessary). Please let me know if you have any questions… you can join here: https://join.slack.com/t/cementframework/shared_invite/enQtMzUzOTIzMDQwNjEwLThkY2FiYWU5ZmQ5ZmEzNGMzMTkyMDgzNTk2MWI0MGU1YWNmNTVmODgxYWNlZjJkZDBmODc0ZjM2MDg5ZmYyOTA
    xxc
    @x007007007
    hi
    I want to add command line optional -c to set up config path. what should I do
    @x007007007 this is difficult because config file parsing happens before command line arguments are
    It’s come up before, and I’ve tried to solve it before, but never to completion
    That said… since then, there have been new features added like app.reload() which could be called after if -c was passed. I would start by trying to add a pre_run hook that looks for -c and if passed, do app.config.parse_file() (that file), then app.reload() … but there are plenty of logistical issues that might arrise.
    BJ Dierkes
    @derks
    @x007007007 if you have no idea, or aren’t very familiar with Cement… please create a github issue to track that request and I’ll try to see what is possible now (since the last time I tried to implement that)
    BJ Dierkes
    @derks
    @/all just a reminder that this channel has moved to Slack. Please join if you are interested in staying connected. Once Cement 3 is released this channel will go away completely. https://join.slack.com/t/cementframework/shared_invite/enQtMzU0OTc5MDQ4NDA0LWMwMzZiOTczZjM4ZjFiZDE3MDk4MzA5ZmYxNmZjNTk4NzUwMzcyN2VlMDc5NzIxYjQ1NzlmNzgyNDFjMWJmMWY
    BJ Dierkes
    @derks
    Cement Framework 3.0 is now available. https://builtoncement.com/