by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 14 19:42
    florimondmanca closed #334
  • Mar 14 19:41
    florimondmanca commented #334
  • Mar 14 19:39

    florimondmanca on pip

    (compare)

  • Mar 14 19:39
    dependabot-preview[bot] commented #342
  • Mar 14 19:39
    florimondmanca closed #342
  • Mar 14 02:00

    dependabot[bot] on npm_and_yarn

    (compare)

  • Mar 14 02:00
    dependabot[bot] commented #343
  • Mar 14 02:00
    florimondmanca closed #343
  • Mar 13 23:34
    codecov-io commented #343
  • Mar 13 23:33
    codecov-io commented #343
  • Mar 13 23:32
    codecov-io commented #343
  • Mar 13 23:29
    dependabot[bot] labeled #343
  • Mar 13 23:29
    dependabot[bot] opened #343
  • Mar 13 23:29

    dependabot[bot] on npm_and_yarn

    Bump acorn from 6.1.1 to 6.4.1 … (compare)

  • Mar 09 05:28
    codecov-io commented #342
  • Mar 09 05:28
    florimondmanca commented #342
  • Mar 09 05:27
    codecov-io commented #342
  • Mar 09 05:26
    codecov-io commented #342
  • Mar 09 05:23
    dependabot-preview[bot] labeled #342
  • Mar 09 05:23
    dependabot-preview[bot] opened #342
Florimond Manca
@florimondmanca
Benchmarking is quite hard and not sure the ones I did were very reliable.
Cool, if you make a PR feel free to request my review :+1:
Marwan Rabbâa
@waghanza
cool, thx
benchmarking is hard, but very helpful learning different cases ...
Florimond Manca
@florimondmanca
Hey all! Can I ask for feedback on a new idea before I dig into the code? If you’re interested, and in order to keep this channel focused on help and welcoming new people, I’ve posted something in the dev room: https://gitter.im/bocadilloproject/dev
Marlysson Silva
@Marlysson

Hey @florimondmanca how did you build the bocadillo's documention ?

Some themes or all built by hand..?

Tobias SN
@TobiasSN
AFAIK it uses Vuepress with a customized version of the default theme.
Florimond Manca
@florimondmanca
Yes @Marlysson, I’m using Vuepress :-) https://vuepress.vuejs.org
Florimond Manca
@florimondmanca
@Marlysson For completeness, I’m also using Pydoc-Markdown to generate API reference in the Markdown format (making them Vuepress-friendly): https://github.com/NiklasRosenstein/pydoc-markdown
Marwan Rabbâa
@waghanza
@florimondmanca do you know https://readthedocs.org/ ?
Florimond Manca
@florimondmanca
I do, and used it once a while ago. Why? :)
Marwan Rabbâa
@waghanza
it could be usefull to parse rst docs ;-)
Florimond Manca
@florimondmanca
Yes, I know it’s used a lot in the Python community in combination with reStructured Text. If you're wondering why I didn’t go for Readthedocs + Sphinx, here are a few reasons:
1) I really prefer writing Markdown to rST, and I found no way of making Sphinx work with Markdown.
2) I find Vuepress a pleasure to use overall :)
3) I wanted to have a theme that sticked out from the classic readthedocs/Albatross themes.
4) Vuepress has a ton of unique features that greatly simplify writing great docs (custom navbar, custom colors, built-in Algolia search integration…).
Marwan Rabbâa
@waghanza
I don no know vuepress so I could not argue against it, but readthedocs and sphinx support markdown
I have to bench readthrdocs / vuepress / gitbook
but later ...
Florimond Manca
@florimondmanca

but readthedocs and sphinx support markdown

Do you refer to https://www.sphinx-doc.org/en/master/usage/markdown.html? :-) For some reason I didn’t find that page while looking for solutions! It supports CommonMark though, and the Vuepress Markdown is supercharged in comparison — you can write Vue components and use them right into the Markdown page.

Marwan Rabbâa
@waghanza
yes, it was that, but ain't nostaligic without any arguments ;-)
Florimond Manca
@florimondmanca
:grinning:
Marlysson Silva
@Marlysson

@florimondmanca I ran this command to install bocadillo:

pip install bocadillo

After installed bocadillo and run the app.py starter file are getting this error message:

Traceback (most recent call last):
  File "app.py", line 1, in <module>
    from bocadillo import App, Templates
ImportError: cannot import name 'App'

There are something that I'm forget about it?

Tobias SN
@TobiasSN
Would you mind running this?
import bocadillo
print(bocadillo.__version__)
It just outputs the version.
Florimond Manca
@florimondmanca
@Marlysson Yup, sounds like pip installed <0.13. Pip installs from cache by default so if you’ve already installed Bocadillo previously it will use whichever version it has in the cache. Use pip install -U bocadillo to force it to download the latest version :)
Marlysson Silva
@Marlysson
@TobiasSN It's shown this:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'bocadillo' has no attribute '__version__'
Marlysson Silva
@Marlysson

I think the problem it's other..

Failed building wheel for uvicorn

Failed build others resources too ( starlette, httptools .. )

Florimond Manca
@florimondmanca
Could you open a bug report with your specs (OS versions, Python version, etc) @Marlysson ?
That __version__ attribute error is very odd. Bocadillo has had that exposed since 0.1!
Marlysson Silva
@Marlysson

Yes, I will do.

I tested in linux , will test in windows enviroment and report some progress..

EricE
@EricE
Greetings. I have starting to think about some web based projects using Bocadillo as well as async desktop utility type apps that query REST interfaces on the web. I was starting with aiohttp but now that requests-async is out I'm inclined to switch. It looks like Bocadillo is using Starlette to manage requests but I'd like to develop libraries that I can use for both my desktop utilities and Bocadillo. I'm a hardware guy who likes to play with software so this may be an obvious guestion, but if I start working in requests-async, can I drop the code into a Bocadillo project? Or is the interface so similar that I can design it to work with both?
Florimond Manca
@florimondmanca
Hi @EricE! Welcome :) requests-async and Bocadillo are 100% compatible. Requests-async allows to make HTTP requests asynchronously and Bocadillo is asynchronous at its core. So yep, you should be able to drop requests-async code into a Bocadillo project.
From your last sentence I’m not sure I fully understood your question though — feel free to ping back if there’s anything unclear!
Marlysson Silva
@Marlysson

@florimondmanca Great news!!!

I was trying to install again bocadillo and now everything is fine..

I'm able to see version thought bocadillo.version and show 0.13.0.

I ran :

sudo apt-get install python3.6-dev libssl-dev

to be able install bocadillo without errors..

WIll whether is good point out this libs when install it?
Florimond Manca
@florimondmanca

Good stuff @Marlysson! I think we could add this to a troubleshooting section in the FAQ.

Would you mind opening an issue with as many details as you can on the problem and your setup (OS, Python version before/after the fix, any tracebacks, etc)? It would be better than handling this via the chat.

If you know how to use Docker you can try to reproduce the issue in a Linux container, and post the Dockerfile so that we can see how/why this happens. Otherwise I can have a shoot at it myself. :)

Luca Lacerda
@lucawen
Hiii!!
I can create files/folders organization and import in main .py file ?
or anything need to be in the same file ?
like flask
Florimond Manca
@florimondmanca
Hi @lucawen, route registration is indeed Flask-style, so you can register routes anywhere you have access to an app. You can use recipes to separate an app into multiple sub-apps. We also have #234 open for module-based route registration. If that doesn't fit your use case feel free to open a feature request :)
Alfred Chiesa
@alfredchiesa
anyone have examples (or boilerplates) that show a more complete suggested large project structure? There is likely something, but I am having a hard time finding it.
Florimond Manca
@florimondmanca
Hey Alfred, I’m not sure how big of a structure you’re looking for. An example real-life application is TermPair, made by @cs01: https://github.com/cs01/termpair Not sure it qualifies as « large », though. If you think there should be some hints in the docs about this, feel free to open an issue!
By the way everyone, I’ll be on vacation for the next 7 days so might not be able to respond right away. Feel free to help each other out as you can. :-)
Zuhair
@zowhair_twitter
Hi!
How can I clone and built/customize bocadillo locally on my own computer
So that I can contribute
Zuhair
@zowhair_twitter
a problem is that, I have installed python3.6 on my laptop, how to replace it with 3.7?? in ubunut
ubuntu*
Florimond Manca
@florimondmanca
@zowhair_twitter The contributing guide should help you get started :) https://github.com/bocadilloproject/bocadillo/blob/master/CONTRIBUTING.md
As for your question about Python, I’m not an Ubuntu user but I guess you should be able to find an answer by a bit of googling 👍
Zuhair
@zowhair_twitter
@florimondmanca Thanks bro
EricE
@EricE
Thanks for the updated documentation on async. In https://bocadilloproject.github.io/guides/async.html#converting-a-regular-function-to-an-asynchronous-function, if compute is slow, the I assume you would wrap it in run_in_threadpool since wrapping it in an async function doesn't protect you?