An opinionated NYC weekend planner for developers
Project description
pynyc
Description
A python package that returns fun NYC plans and recommendations!
Github
Developers
Albert Chen Blake Chang Valeria Chang Vincent Campanaro Sasha Cartagena
An exercise to create a Python package, build it, test it, distribute it, and use it. See instructions for details.
Installing the Package
Install pynyc directly from PyPI:
pip install pynyc
find_restaurant(cuisine, michelin=False)
Returns a restaurant name in New York City for a given cuisine type.
| Parameter | Type | Required | Description |
|---|---|---|---|
cuisine |
str |
Yes | The type of food you want (e.g. "italian", "japanese") |
michelin |
bool |
No | Set to True to get a Michelin-listed restaurant. Default is False |
Example usage
import pynyc
# Generate any Italian restaurant
restaurant = pynyc.find_restaurant("italian")
print(f"Go to {restaurant}")
# Help you to pick a Michelin-listed Japanese restaurant
restaurant = pynyc.find_restaurant("japanese", michelin=True)
print(f"Go to {restaurant}")
Input is case-insensitive for better efficiency— "ITALIAN", "Italian", and "italian" all work the same.
find_activity(weather)
Returns an activity recommendation in NYC based on the weather.
| Parameter | Type | Required | Description |
|---|---|---|---|
weather |
str |
Yes | The weather outside (e.g. "hot", "freezing", "perfect", "rainy") |
Input is case-insensitive - "sunny", "Sunny", and "SUNNY" all work the same.
See the full working example in example.py.
Example usage
import pynyc
#Prints an actvity suitable for sunny weather
activity = pynyc.find_activity("sunny")
print(activity)
find_nightlife_activity(vibe)
Returns one nightlife recommendation in New York City for a given vibe.
| Parameter | Type | Required | Description |
|---|---|---|---|
vibe |
str |
Yes | The nightlife vibe you want (e.g. "dancing", "singing", "laughing", "music and vibes") |
Example usage
import pynyc
# Get one random dancing recommendation
activity = pynyc.find_nightlife_activity("dancing")
print(f"Go to {activity['name']} for {activity['activity_type']}")
print(f"Website: {activity['website']}")
# Aliases also work
activity = pynyc.find_nightlife_activity("karaoke")
print(activity)
# Invalid vibes raise a helpful error instead of crashing silently
try:
pynyc.find_nightlife_activity("quiet reading")
except ValueError as error:
print(error)
Input is case-insensitive - "DANCING", "Dancing", and "dancing" all work the same.
See the full working example in example.py.
list_nightlife_places(vibe)
Returns a list of nightlife places in New York City for a given vibe.
| Parameter | Type | Required | Description |
|---|---|---|---|
vibe |
str |
Yes | The nightlife vibe you want (e.g. "dancing", "singing", "laughing", "music and vibes") |
Example usage
import pynyc
# Get all nightlife places for a dancing vibe
places = pynyc.list_nightlife_places("dancing")
for place in places:
print(f"{place['name']}: {place['website']}")
# Aliases also work
places = pynyc.list_nightlife_places("club")
print(places[0])
# Invalid vibes raise a helpful error instead of crashing silently
try:
pynyc.list_nightlife_places("quiet reading")
except ValueError as error:
print(error)
Input is case-insensitive - "DANCING", "Dancing", and "dancing" all work the same.
See the full working example in example.py.
get_cafe(time)
Returns a recommended cafe in New York City based on the time of day.
| Parameter | Type | Required | Description |
|---|---|---|---|
time |
str |
Yes | Time of day ("morning", "afternoon", "evening") |
Example usage
import pynyc
cafe = pynyc.get_cafe("morning")
print(f"You should check out {cafe}")
Input is case-insensitive - "MORNING", "Morning", and "morning" all work the same.
If the input is invalid, the function returns a helpful error message.
See the full working example in example.py.
find_excursion(category)
Returns one excursion recommendation in New York City for a given category.
| Parameter | Type | Required | Description |
|---|---|---|---|
category |
str |
Yes | The excursion category you want (e.g. "nature", "historic", "coastal") |
Example usage
import pynyc
# Get one random nature excursion
excursion = pynyc.find_excursion("nature")
print(f"Go to {excursion['name']} in {excursion['location']}")
print(f"Website: {excursion['website']}")
# Aliases also work
excursion = pynyc.find_excursion("beach")
print(excursion)
# Invalid categories raise a helpful error instead of crashing silently
try:
pynyc.find_excursion("underwater")
except ValueError as error:
print(error)
Input is case-insensitive - "NATURE", "Nature", and "nature" all work the same.
See the full working example in example.py.
list_excursions(category)
Returns a list of excursion places in New York City for a given category.
| Parameter | Type | Required | Description |
|---|---|---|---|
category |
str |
Yes | The excursion category you want (e.g. "nature", "historic", "coastal") |
Example usage
import pynyc
# Get all excursion places for a nature category
places = pynyc.list_excursions("nature")
for place in places:
print(f"{place['name']}: {place['website']}")
# Aliases also work
places = pynyc.list_excursions("outdoors")
print(places[0])
# Invalid categories raise a helpful error instead of crashing silently
try:
pynyc.list_excursions("underwater")
except ValueError as error:
print(error)
Input is case-insensitive - "NATURE", "Nature", and "nature" all work the same.
See the full working example in example.py.
Setting Up for Development
Prerequisites
- Python 3.10 or later
- pipenv — install it with:
pip install pipenv
1. Clone the repository
git clone https://github.com/swe-students-spring2026/3-package-sea_otter.git
cd 3-package-sea_otter
2. Create the virtual environment and install dependencies
pipenv install --dev
3. Activate the virtual environment
pipenv shell
4. Run the tests
pipenv run pytest
All tests should pass. If they don't, check that you are using Python 3.10 or later.
5. Run the example program
pipenv run python example.py
Environment Variables
This package does not require any environment variables or external database setup. All data is bundled with the package in the pynyc/data/ directory.
No .env file is needed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pynyc-0.1.0.tar.gz.
File metadata
- Download URL: pynyc-0.1.0.tar.gz
- Upload date:
- Size: 57.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
243b5f487d2c18c9d342de82d43791a696113f7fa911169853179360618e3fb1
|
|
| MD5 |
3a4b75b5c3e92c86a8d92a9d5be49fdd
|
|
| BLAKE2b-256 |
a82f20bd21e158bd082eb65a1913a762f51b6e584251bd1acedc5d46f6f1e798
|
File details
Details for the file pynyc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pynyc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 42.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9707f85e2a64d4fe11d66042dc5cdef36b2b312ac34cd84c5132d6269a9dd31f
|
|
| MD5 |
86180b9a7d214e5c1013975c969da59b
|
|
| BLAKE2b-256 |
49f0d1cec0a789b047a66784f204a4cba965a1d522da2a509e2732bb5cebb738
|