Skip to content

Commit 2159fc0

Browse files
committed
Rename project from "ytpy" to "ytbpy", update license format, enhance project metadata in pyproject.toml, and remove unused source files including video, search, playlist, and utility modules.
1 parent fa7e651 commit 2159fc0

11 files changed

Lines changed: 83 additions & 18 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
push:
13+
branches:
14+
- master
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
deploy:
21+
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
- name: Set up Python
28+
uses: actions/setup-python@v3
29+
with:
30+
python-version: '3.x'
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install setuptools wheel twine
35+
- name: Build and publish
36+
run: |
37+
python setup.py sdist bdist_wheel
38+
twine upload dist/* --verbose
39+
env:
40+
TWINE_USERNAME: __token__
41+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ytpy
1+
# ytbpy
22

33
A fast, lightweight Python library for extracting information from YouTube without requiring API keys or authentication.
44

@@ -12,17 +12,17 @@ A fast, lightweight Python library for extracting information from YouTube witho
1212
## Installation
1313

1414
```bash
15-
git clone https://github.com/tn3w/ytpy.git
16-
cd ytpy
17-
git install -e .
15+
git clone https://github.com/tn3w/ytbpy.git
16+
cd ytbpy
17+
pip install -e .
1818
```
1919

2020
## Usage
2121

2222
### Get Video Information
2323

2424
```python
25-
from ytpy import video
25+
from ytbpy import video
2626

2727
# Get details about a video using URL or ID
2828
video_info = video.get_video_info('https://www.youtube.com/watch?v=rZ6luwT8kuc')
@@ -37,7 +37,7 @@ print(video_info['views_count'])
3737
### Using OEmbed API
3838

3939
```python
40-
from ytpy import video
40+
from ytbpy import video
4141

4242
# Get details about a video using URL or ID
4343
video_info = video.get_video_info_oembed('https://www.youtube.com/watch?v=rZ6luwT8kuc')
@@ -50,7 +50,7 @@ print(video_info['title'])
5050
### Search YouTube
5151

5252
```python
53-
from ytpy import search
53+
from ytbpy import search
5454

5555
# Search YouTube videos
5656
results = search.search_youtube('python tutorial', max_results=5)
@@ -62,7 +62,7 @@ for video in results:
6262
### Get Playlist Information
6363

6464
```python
65-
from ytpy import playlist
65+
from ytbpy import playlist
6666

6767
# Get all videos in a playlist
6868
playlist_info = playlist.get_playlist_info('https://www.youtube.com/playlist?list=PLOU2XLYxmsIJQPs-2nnII-n59vYoxKsmq')
@@ -77,7 +77,7 @@ for video in playlist_info['videos']:
7777
### Get Channel Information
7878

7979
```python
80-
from ytpy import channel
80+
from ytbpy import channel
8181

8282
# Get channel info and recent videos
8383
channel_info = channel.get_channel_info('https://www.youtube.com/channel/UC_x5XG1OV2P6uZZ5FSM9Ttw')

pyproject.toml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,39 @@ requires = ["setuptools>=42", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "ytpy"
6+
name = "ytbpy"
77
version = "0.1.0"
88
description = "A fast, lightweight Python library for extracting information from YouTube without requiring API keys"
99
readme = "README.md"
1010
authors = [
1111
{name = "TN3W", email = "tn3w@protonmail.com"}
1212
]
13-
license = {text = "Apache License 2.0"}
13+
license = "Apache-2.0"
14+
requires-python = ">=3.6"
1415
classifiers = [
15-
"Programming Language :: Python :: 3",
16-
"License :: OSI Approved :: Apache Software License",
16+
"Development Status :: 4 - Beta",
17+
"Environment :: Web Environment",
18+
"Intended Audience :: Developers",
1719
"Operating System :: OS Independent",
20+
"Programming Language :: Python",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.6",
23+
"Programming Language :: Python :: 3.7",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
1828
"Topic :: Internet :: WWW/HTTP",
1929
"Topic :: Multimedia :: Video",
2030
]
2131
keywords = ["youtube", "api", "scraper", "video", "playlist", "channel", "search"]
22-
requires-python = ">=3.6"
2332
dependencies = []
2433

2534
[project.urls]
26-
Homepage = "https://github.com/tn3w/ytpy"
27-
Repository = "https://github.com/tn3w/ytpy"
35+
Homepage = "https://github.com/tn3w/ytbpy"
36+
Documentation = "https://github.com/tn3w/ytbpy"
37+
Repository = "https://github.com/tn3w/ytbpy.git"
38+
Issues = "https://github.com/tn3w/ytbpy/issues"
39+
40+
[tool.setuptools]
41+
packages = ["ytbpy"]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from setuptools import setup
22

33
if __name__ == "__main__":
4-
setup()
4+
setup()

src/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

ytbpy/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
ytbPy
3+
-----
4+
A Python library for interacting with YouTube.
5+
"""
6+
7+
__version__ = "0.1.0"
8+
9+
from . import video, playlist, channel, search
10+
11+
__all__ = ["video", "playlist", "channel", "search"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)