Skip to content

NYCPython/nycpython.com

Repository files navigation

nycpython.com

The official website of the NYC Python meetup group.

Technologies

We will be using the following technologies

Getting Started

Here's everything you need to know to get a copy of nycpython.com running locally.

What You Need

If you do not have Python 3 installed, you will also need:

What You Need to Know

Once you are familiar with Flask, it is recommended that you also become familiar with blueprints and application factories. For more information about application factories, please check out this post by Matt Wright.

Setup with VirtualBox and Vagrant

After installing VirtualBox and Vagrant (see above), fork the code on GitHub and clone it locally by executing the following command, replacing USERNAME with your GitHub username:

$ git clone git@github.com:USERNAME/nycpython.com.git

After doing that, execute the following command to build your local virtual machine:

$ vagrant up

You can access all of your code locally, but you will need the virtual machine to access the server. To access the virtual machine's command line interface, execute the following command:

$ vagrant ssh

To run the nycpython.com server, execute the following commands on the virtual machine:

$ workon nycpythoncom
$ python wsgi.py

The site can be accessed in your browser by visiting localhost:5050.

Setup without VirtualBox or Vagrant

For users unable to install VirtualBox or Vagrant you can still get a copy running locally. Fork the code on GitHub and clone it locally by executing the following command, replacing USERNAME with your GitHub username:

$ git clone git@github.com:USERNAME/nycpython.com.git

After doing that, create a virtual environment nycpythoncom with Python 3 as your default interpreter and execute the following command to install all the necessary dependencies for this project:

$ pip install -r requirements.txt

Next, we'll need to install Redis before we can run the server. Deactivate your virtual environment and see the Redis Quickstart guide for installation instructions.

Once you have Redis installed, reactivate your virtual environment and execute the following commands to run the nycpython.com server:

$ redis-server &
$ python wsgi.py

The site can be accessed in your browser by visiting localhost:5000.

Settings

Most settings are read from environment variables. For a full list, please check nycpython/settings.py. It can become difficult to maintain these variables, especially when working with Vagrant. To make it easier, a file called settings.cfg can be placed inside the instance folder. Any settings defined here will override the defaults. instance/example_settings.cfg can be used as an example for how to set up such a file.

Meetup API

In order to work with the Meetup API, you will need a Meetup API Key. You will also need to know the ID of the group for which you want to get data. In the case of NYC Python, the group ID is 263790.

Twitter API

In order to work with the Twitter API, you will need to create a Twitter Application. Once you have created the application, you will be able to retrieve its OAuth settings.

Contributing

A list of issues can be found on GitHub. Issues are categorized according to specific areas of focus. The can be used to help find issues in which you are particularly interested.

Pick one and start hacking away!

After you're done, be sure to add your name and GitHub profile to AUTHORS.rst.

Testing

Before you push your changes back to GitHub and submit a pull request, you probably want to run the test suite. To prepare for running the tests, install the testing requirements:

$ pip install -r tests/requirements.txt

The tests should be run using tox:

$ tox

If you are using Vagrant, make sure you connect to your virtual machine first:

$ vagrant ssh

Once connected:

$ workon nycpythoncom
$ pip install -r tests/requirements.txt
$ tox

About

The official website for the NYC Python meetup group

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published