Hi Steve, Thanks, this is completely understandable, even just your feedback on API, various hooks and requests for clarification is helpful. If there are some questions that you are afraid to ask on public mailing list, feel free to contact any of us directly.
If it's security related, you can even contact [email protected]. Thanks, -- Matthias On Mon, Sep 26, 2016 at 10:29 AM, Steven Anton <[email protected]> wrote: > I'd actually love to commit it back to OS. We deal with a lot of PII so > having plain-text notebook formats is very bad for us. To get around this, > we have a contents manager that encrypts notebooks to gpg files. I imagine > this is generally useful, but I don't know if we will ever be able to > publish it because of security concerns. > > On Monday, September 26, 2016 at 10:06:35 AM UTC-7, Matthias Bussonnier > wrote: >> >> Great ! >> >> Looking FWD to see your custom content manager ! >> -- >> M >> >> On Mon, Sep 26, 2016 at 10:05 AM, Steven Anton <[email protected]> >> wrote: >> > Hi Matthias, yes that makes perfect sense. Also, I just noticed this >> > page, >> > which has a really good explanation. I don't know why I couldn't find >> > that >> > before when I was searching. Thanks again! >> > >> > On Monday, September 26, 2016 at 10:00:40 AM UTC-7, Matthias Bussonnier >> > wrote: >> >> >> >> Hi Steve, >> >> >> >> Quickly handwaved: >> >> >> >> ``` >> >> from traitlets import Configurable, Unicode >> >> >> >> >> >> class MyCustomContentManager(Configurable): >> >> >> >> >> >> >> >> # the class attribute will be AutoMagically be made a instance one >> >> and accessible via self.parameter. >> >> parameter = Unicode('default', config=True, help='Frobulate >> >> parameter as Unicode from the command line or config files.') >> >> >> >> def __init__(self, ..., parent=None, config=None): >> >> super().__init__(...,parent=parent, config=config) # important >> >> ... >> >> ``` >> >> >> >> >> >> You can set the value of parameter with >> >> `c.MyCustomContentManager.parameter = 'Whatever'` in any config file. >> >> >> >> This pattern is in many places of our codebase[1] and uses metaclasses. >> >> >> >> If your content manager inherit from ours , then >> >> `c.ContentManager.parameter = 'Whatever'` should work as well. >> >> >> >> Does that make some sens ? There is a bit more magic involved if you >> >> want advanced features, but I guess that might be already a lot to >> >> digest. >> >> >> >> Cheers, >> >> -- >> >> M >> >> >> >> >> >> [1]: >> >> >> >> https://github.com/jupyter/notebook/blob/master/notebook/services/contents/manager.py#L65-L95 >> >> >> >> On Mon, Sep 26, 2016 at 9:47 AM, Steven Anton <[email protected]> >> >> wrote: >> >> > Hi everyone, >> >> > >> >> > I have a custom ContentsManager class that I'd like to configure >> >> > using >> >> > the >> >> > standard Jupyter tools. In particular, I'm looking for something >> >> > along >> >> > the >> >> > lines of adding a line like "c.MyContentsManager.parameter = 'value'" >> >> > to >> >> > the >> >> > jupyter_notebook_config.py and reading that parameter in the custom >> >> > ContentsManager. I'm hoping this is an easy task, but I can't seem to >> >> > find >> >> > the relevant functions in the jupyter source code. Maybe something >> >> > like: >> >> > >> >> > # source code for the custom ContentsManager >> >> > >> >> > from notebook.services.config import ConfigManager >> >> > >> >> > cm = ConfigManager() >> >> > >> >> > cm.get("MyContentsManager").get("parameter", "default") >> >> > >> >> > Does anyone have ideas on how to accomplish this? >> >> > >> >> > Thanks so much! >> >> > Steve >> >> > >> >> > -- >> >> > You received this message because you are subscribed to the Google >> >> > Groups >> >> > "Project Jupyter" group. >> >> > To unsubscribe from this group and stop receiving emails from it, >> >> > send >> >> > an >> >> > email to [email protected]. >> >> > To post to this group, send email to [email protected]. >> >> > To view this discussion on the web visit >> >> > >> >> > >> >> > https://groups.google.com/d/msgid/jupyter/193be8d9-3321-4dca-b058-6c9ce266355b%40googlegroups.com. >> >> > For more options, visit https://groups.google.com/d/optout. >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "Project Jupyter" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an >> > email to [email protected]. >> > To post to this group, send email to [email protected]. >> > To view this discussion on the web visit >> > >> > https://groups.google.com/d/msgid/jupyter/244fcb2c-574a-4ad1-8e43-29f4bb19e4bf%40googlegroups.com. >> > >> > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/27341795-35d2-43b4-99f8-627af80634d7%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CANJQusW3K8%3DZ111ZY_XfLT6eRV_tD%3DHsTVxc9JoYM8-GDOxWjw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
