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 2020 19:42
    florimondmanca closed #334
  • Mar 14 2020 19:41
    florimondmanca commented #334
  • Mar 14 2020 19:39

    florimondmanca on pip

    (compare)

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

    dependabot[bot] on npm_and_yarn

    (compare)

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

    dependabot[bot] on npm_and_yarn

    Bump acorn from 6.1.1 to 6.4.1 … (compare)

  • Mar 09 2020 05:28
    codecov-io commented #342
  • Mar 09 2020 05:28
    florimondmanca commented #342
  • Mar 09 2020 05:27
    codecov-io commented #342
  • Mar 09 2020 05:26
    codecov-io commented #342
  • Mar 09 2020 05:23
    dependabot-preview[bot] labeled #342
  • Mar 09 2020 05:23
    dependabot-preview[bot] opened #342
Florimond Manca
@florimondmanca
👍
Florimond Manca
@florimondmanca
Hey, what’s everyone opinion on #124? How is the API class name relevant or irrelevant? We’re not specifically targetting REST APIs and this is a very early-days design choice, so now is a good time to challenge that :-)
Tobias SN
@TobiasSN
Yeah I think that App would be a much better choice. The
Tobias SN
@TobiasSN
Say you had a Recipe for your API. Now, you would most likely have named the main object api just because that’s how it is in the snippets. But what would you then name your Recipe? You could name it api_recipe or rest_api, but that’s a bit verbose. So you could rename the main object to app, and your recipe to api, but now people will see routes decorated with @api.route(“/foo”) and think they be accessible bypage/foo, instead of something likepage/api/foo` which it would actually be. Worst case, they'll make new routes decorated with the API Recipe and not the main object, and end up putting those under the API path, getting confused when they can’t access it from the exact path they specified.
Florimond Manca
@florimondmanca
A recipe for a REST API could be named api, yes, although I think that could also be a totally different app that you would mount onto the main one.
The idea is that we update references to api as the main object too. For example, app = App(). I’m also concerned that might be confusing to some people, but I don’t think they have an api recipe (since that name was already taken by the main object).
Florimond Manca
@florimondmanca
Hey! I got to fiddle with logos this weekend and posted an attempt on #24. What do you guys think? Does it fit the project? :-)
Florimond Manca
@florimondmanca
Quick poll about better naming for the API class, following up on our discussions here: https://twitter.com/bocadillopy/status/1095594986731646982?s=21
Marwan Rabbâa
@waghanza
Hi, I've created the-benchmarker/web-frameworks#951 to compare bocadillo with others python frameworks
if anyone want to contrib it will be :heart:
Florimond Manca
@florimondmanca
Great stuff @waghanza ! Didn’t know about this benchmark project, looks very thorough and having Bocadillo on there would be a great addition for sure. :-) I’ve already tinkered with benchmarking over https://github.com/bocadilloproject/benchmarks, I’ll link to it on the issue in case anywant wants to tackle it!
Marwan Rabbâa
@waghanza
yeah nice, but the purpose is also to gather some benchmarks
I've seen than japronto, sanic, vibora has their own
and why not having one reference one python world
Florimond Manca
@florimondmanca
Yes, I’m 100% in favor of adding Bocadillo to both of those projects
Marwan Rabbâa
@waghanza
;-) trying now
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!!