Mentoring

49 views
Skip to first unread message

Jaime Sangcap

unread,
Mar 25, 2017, 5:39:31 PM3/25/17
to pylons-discuss
Permission to Post.

Hi all! Coming from a PHP background, I'm just starting out with python and very eager to learn pyramid as it seems a pretty solid framework.

I'm wondering if someone is interested in mentoring/coaching maybe to build an app to demo how to customize pyramid and explain further. The documentation is actually great but sometimes I run into some points where I need to know how to translate what I'm doing from PHP into pythonic way, dependency injection for example.

I know you guys are really busy doing amazing things so I don't expect it to be free, but not too expensive neither :)
Of course free offers are welcome maybe I can contribute back on your project later on :)

My subject of interest if possible are
- TDD/BDD/DDD
- Dependency Injection / Service Container
- Basic Server setup (like nginx to reverse proxy python?)

Steve Piercy

unread,
Mar 25, 2017, 6:17:49 PM3/25/17
to pylons-...@googlegroups.com
Hi Jaime,

Welcome to Pyramid! You'll find that the community is helpful.

As with all projects under the Pylons Project, requesting
support follows our guidelines. Pyramid has some specific
community guidelines and resources:
https://trypyramid.com/community.html
https://trypyramid.com/resources.html

TDD/BDD/DDD is outside Pyramid's and the Pylons Project's
realms, although there exist implementations of such practices
within Python that may be useful. Sorry, I don't have specific examples.

I'm not really clear what you mean by Dependency Injection /
Service Container. Do you mean a package manager / using
virtual environments?

For server setup, we have a relevant section in the Pyramid
Community Cookbook.
http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/index.html

If you have specific questions, we can direct you to appropriate
resources or help you understand things that are different
between Python and PHP. Sometimes it helps if you say, "I used
X in PHP, which helped me do A, B, and C. Is there something
similar in Python?"

--steve



On 3/25/17 at 2:39 PM, iam.d...@gmail.com (Jaime Sangcap) pronounced:
------------------------
Steve Piercy, Soquel, CA

Jaime Sangcap

unread,
Mar 25, 2017, 6:56:01 PM3/25/17
to pylons-discuss
Hi Steve,

Thank you for the reference, looks great to help me go along. Sorry if I didn't make myself clear enough on my post. 

Regarding the dependency injection/service container, what I mean is that when a view callable depends on a service to fulfill its job, in PHP I usually inject it dependencies in constructor

public function __construct($taskRepository, $orgChart)
{
    $this
->taskRepository = $taskRepository;
    $this
->orgChart = $orgChart;
}

the arguments will be resolved by the service container via configuration.

in pyramid I'm thinking if its possible to do the same way like

def my_view(request, taskRepository, orgChart):
    task
= taskRepository.findByid(request.params["taskId"])
   
// do more work
   
return task

notice that the taskRepository and orgChart are injected as arguments, not sure if its possible or something related to ZCML?

The common thing I see is that you will add it in the registry so you can use it inside the view method body like

request.taskRepository.findById. But Im not sure if its easily testable.

Michael Merickel

unread,
Mar 25, 2017, 7:08:13 PM3/25/17
to Pylons
Jaime, for DI please look at pyramid_services. It is actually more service locator but if you squint it is basically DI when you avoid passing the request between services. It is the closest to DI that I have seen for Pyramid without actually munging the view arguments.


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/145b0c08-6843-49f6-80c7-d65afe7320cc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jaime Sangcap

unread,
Mar 25, 2017, 7:40:13 PM3/25/17
to pylons-discuss
Hi Michael,

Thank you. Im looking into it now, it looks interesting. It seems to fit my use case. I'll try to play on it and get back.

Mike Orr

unread,
Apr 1, 2017, 3:20:55 PM4/1/17
to pylons-...@googlegroups.com
On Sat, Mar 25, 2017 at 2:33 PM, Jaime Sangcap <iam.d...@gmail.com> wrote:
> Permission to Post.
>
> Hi all! Coming from a PHP background, I'm just starting out with python and
> very eager to learn pyramid as it seems a pretty solid framework.
>
> I'm wondering if someone is interested in mentoring/coaching maybe to build
> an app to demo how to customize pyramid and explain further. The
> documentation is actually great but sometimes I run into some points where I
> need to know how to translate what I'm doing from PHP into pythonic way,
> dependency injection for example.
>
> I know you guys are really busy doing amazing things so I don't expect it to
> be free, but not too expensive neither :)
> Of course free offers are welcome maybe I can contribute back on your
> project later on :)

There are a couple of opportunities coming up if you're attending
PyCon next month:

- You can lead an Open Space on "Teach Me Pyramid and Python", and
those who are available will come and help (and others may bring their
own questions). Other people have done this with frameworks they
wanted to learn.

- If there's a Pylons Project booth in the exhibition hall (is there
this year?), you can talk with some of the core developers there.

If you won't be at PyCon, there may be a similar conference in your
region or a local users' group in your city with people who know
Pyramid. python.org has a list of users' groups. You may find someone
willing to review your program outline or code drafts, and perhaps you
can buy them something like a programming book they want in return. In
my earlier days I might have offered to mentor but now I can't make
commitments... unless possibly you happen to live in Seattle.

Otherwise you can ask specific questions on this list or the IRC
channel. That's what I do when I don't understand something or can't
get something to work.

I learned Python from the standard documentation and using it. Pyramid
has a bit of a learning curve because it has some different paradigms
from PHP or other Python frameworks, but that's what makes it scalable
to large and complex situations or changing out a library if you need
those someday. The Pyramid manual explains a lot, the tutorials should
help, and you can ask questions for anything beyond that.

Steve Piercy

unread,
Apr 1, 2017, 5:18:36 PM4/1/17
to pylons-...@googlegroups.com
Meetups are great places to find help in person with Python.
https://www.meetup.com/find/events/

Although there will be no Pylons Project or Pyramid booth at
PyCon this year, a couple of the core developers will be
participating in Development Sprints at PyCon.
https://us.pycon.org/2017/community/sprints/

Any of the volunteers at open source booths at PyCon will gladly
take some time to help you get started. Plone folks come from
the same roots as Pyramid mummies, and may be your best Pyramid
resource and help you hunt down the elusive and wily core
developers who will be at PyCon. Say thanks and buy a T-shirt
or make a donation to support their efforts. See the list of
Open Source Project/Community sponsors at the end of this page:
https://us.pycon.org/2017/sponsors/

Follow PylonsProject on Twitter for announcements of webinars,
tutorials, meetups, and other events.
https://twitter.com/PylonsProject

Pyramid and the Pylons Project will have a presence at two
conferences this year. Take a work-cation and write it off on
your taxes. ;)

PyConWEB 2017
27-28 May 2017, Munich, Germany
https://pyconweb.com/

Plone Digital Experience Conference 2017
16-22 Oct 2017, Barcelona, Spain
https://2017.ploneconf.org/

--steve
Reply all
Reply to author
Forward
0 new messages