Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4f43a87

Browse files
Merge pull request #2875 from Kalivarapubindusree/chinni
Create_And_Manage_Heroku_Apps script added
2 parents c77ee9e + 1368ac7 commit 4f43a87

File tree

4 files changed

+55
-60
lines changed

4 files changed

+55
-60
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import heroku3
2+
3+
def create_heroku_app(app_name):
4+
heroku_conn = heroku3.from_key('YOUR_HEROKU_API_KEY') # Replace with your Heroku API key or use heroku3.from_key(heroku_api_key)
5+
app = heroku_conn.create_app(name=app_name)
6+
return app
7+
8+
def list_heroku_apps():
9+
heroku_conn = heroku3.from_key('YOUR_HEROKU_API_KEY') # Replace with your Heroku API key or use heroku3.from_key(heroku_api_key)
10+
apps = heroku_conn.apps()
11+
return apps
12+
13+
def delete_heroku_app(app_name):
14+
heroku_conn = heroku3.from_key('YOUR_HEROKU_API_KEY') # Replace with your Heroku API key or use heroku3.from_key(heroku_api_key)
15+
app = heroku_conn.apps().get(app_name)
16+
if app:
17+
app.delete()
18+
print(f"App '{app_name}' deleted successfully.")
19+
else:
20+
print(f"App '{app_name}' not found.")
21+
22+
def main():
23+
app_name = input("Enter the name of the Heroku app: ")
24+
25+
# Create a new Heroku app
26+
new_app = create_heroku_app(app_name)
27+
print(f"Heroku app '{new_app.name}' created successfully.")
28+
29+
# List all Heroku apps
30+
print("\nList of all Heroku apps:")
31+
apps = list_heroku_apps()
32+
for app in apps:
33+
print(app.name)
34+
35+
# Delete a Heroku app
36+
delete_app = input("Enter the name of the app to delete: ")
37+
delete_heroku_app(delete_app)
38+
39+
if __name__ == "__main__":
40+
main()s
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Create_And_Manage_Heroku_Apps
2+
3+
Short description of package/script
4+
5+
- This Script Was simple to setup
6+
- Need import heroku3
7+
8+
## Setup instructions
9+
10+
Just Need to run this command " pip install heroku3 "
11+
then run the Create_And_Manage_Heroku_Apps.py file and for running python3 is must be installed!
12+
13+
## Detailed explanation of script, if needed
14+
15+
This Script Is Only for Create and manage Heroku apps use only!

‎Folder_locker_and_Hider/Folder_locker_and_Hider .py‎

Lines changed: 0 additions & 46 deletions
This file was deleted.

‎Folder_locker_and_Hider/README.md‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /